A web application front-end for the Internal Displacement visualization tool, uses babel, react, redux, webpack. Tests use mocha and enzyme.
You will need node.js and a package manager (yarn or npm which comes with node)
- Clone the repository from GitHub
git clone git@github.com:Data4Democracy/internal-displacement-web.git
- In the root of the project folder use yarn or npm to install all the dependencies. Run either of the following commands.
npm i
OR if you are using yarn as your package manager
shell-script yarn install
3. To run locally run the following command
PORT=<PORT_NUMBER> npm run start
where <PORT_NUMBER> is the port of your choice. e.g.
PORT=3000 npm run start
Once it starts you should be able to go to http://localhost:<PORT_NUMBER> if you used 3000 the port number. You should be able to view the application locally in a browser at http://localhost:3000/
To run tests once run the following command
npm run test
To run tests continuously run the following command
npm run test:watch
To build and create a minified version for deployment. it will update or create a folder named dist in the project root
npm run build