This is a map which shows potential waypoints in a cycling trip across Japan.
- Create a mapbox api token as described on the Mapbox website. Note that it is recommended that you use a token which is restricted to the production URL.
- Create a file called
.env.local
insample-map-app
and give it the following contents:WhereREACT_APP_MAPBOX_TOKEN='{YOUR_MAPBOX_TOKEN}'
{YOUR_MAPBOX_TOKEN}
is your mapbox token. Make sure to include the quotation marks.
- Make sure that react-scripts is installed (
npm install react-scripts --save
). - Navigate to
sample-map-app
and run the commandnpm start
.
- Make sure that serve is installed (
npm install -g serve
) - Build the app with
npm run build
- Run
serve -s build
There are 2 sets of tests: unit tests and UI tests.
- Navigate to
sample-map-app
and runnpm test
.
- Make sure you version 3.7.8 or greater of python installed
- Make sure you have selenium for python installed (
pip install selenium
). - Download Chrome WebDriver and place it in
sample-map-app\selenium_tests\chromedriver.exe
. - Make sure that the app is running
- Navigate to
sample-map-app\selenium_tests
and runpython RunAllTests.py