Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

Pre-processing script to run server side to generate .json for Humanitarian OpenstreetMap Team M&E Dashboard

Notifications You must be signed in to change notification settings

ReliefApplications/hot-dashboard-preprocessing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hot Dashboard Preprocessing

Install

Run npm install to install all the needed dependencies.

How this works

This project is developed from a react basis so it's javascript based. Because this script will run from a Lambda function, we have to transform it into a Node.js interpretable code. In order to do so, we use Babel

Build

Run npm run build:preprocess to transform the javascript project into a Node.js executable one. The build artifacts will be stored in the dist-preprocess directory.

Deploy on AWS Lambda

You need to set up a lambda function but before then, you have to create an IAM role with the "LambdaExecute" role. For the lambda creation, choose the Node.js 8.10 runtime and the role you just created.

Then, you have to import the dist-preprocess folder you created thanks to babel. Don't forget to compress it !

Once it's done, you have to type in the Handler, it should be dist-preprocess/scripts/Preprocess.default for this specific project.

Then, you can create a cron job in order to execute the function on a regular basis. You can get help here

Dependencies

- babel-cli
- babel-plugin-transform-async-functions
- babyparse
- jquery

Further help

To get more help on Babel go check out the Babel README.

Known issues

If you have require issues when launching the lambda function, you need to run npm i into the dist-preprocess folder.

About

Pre-processing script to run server side to generate .json for Humanitarian OpenstreetMap Team M&E Dashboard

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •