Skip to content

image

Clone the frontend:

First, you need to fetch the source code for the frontend using the following command:

git clone https://github.com/worldbank/WB-rezoning-explorer.git

Move into the directory using:

cd WB-rezoning-explorer

Building the frontend:

To build the frontend properly a specific version of Node needs to be used.

  • Setup node version manager (nvm) following instructions from NVM github
  • install nodejs 12 using the commands:

    nvm install v12
    nvm use v12
    

  • Install Yarn on ubuntu using:

npm install -g yarn
  • Install npm dependencies using:
yarn install
yarn serve
  • Run tests with:
yarn test

Using the front end with different rezoning API deployment settings:

  • In app/scripts/config/ there are setting files for each environment type (local, production or staging).
  • You can set which environment to use by setting NODE_ENV environment variable to "testing", "staging" or "development".
  • You can use a different MapBox key by writing a different mbToken in the config file.
  • apiEndpoint in the settings file indicates the URL to the rezoning-explorer-api in use.