Clone the frontend:¶
First, you need to fetch the source code for the frontend using the following command:
Move into the directory using:
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:
-
Install Yarn on ubuntu using:
- Install npm dependencies using:
- Start the server with live code reload at http://localhost:9000:
- Run tests with:
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.