The Front End project for Scoot Networks' Associate Engineer assessment.
- Node.js version >=
6.5
- npm version >=
3.10
To check node.js and npm versions, run:
node -v
npm -v
- More info: https://nodejs.org/en/download/
From the project root directory:
npm install
npm start
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
npm run build && serve -s build
# or
npm run prod
Builds the app to the build
folder, and serves it.
Open http://localhost:5000 to view it in the browser.
The <ScootMap />
component runs in development
mode by default, even if the app is running in production
mode.
-
You will need a Google API KEY
-
Copy-paste your Google API Key into
.env.example
like such:
REACT_APP_GOOGLE_API_KEY= #API key goes here
- Save
- Rename
.env.example
to.env
Note:
.env
is excluded from version control to avoid sharing API keys (ex. to GitHub). And may no longer be viewable from your text editor. To edit it directly...From the project root directory:
open .env # or vim .env
The map should now run in production
mode, when the app is in production
mode as well!