Taken from:
- Introduction to OSRM: Setting up osrm-backend using Docker (part 1 of 4)
- Hosting the OSRM API on EC2: Running osrm-backend as a web service (part 2 of 4)
- OSRM Route API: Free turn by turn directions and polylines (part 3 of 4)
- OSRM Table API: Free distance matrix API (part 4 of 4)
How to run the app:
- cd into your project
- Create a .env file with the following parameters:
REACT_APP_MAPBOX_TOKEN={MAPBOX_ACCESS_TOKEN} REACT_APP_API_URL='http://localhost:3001' REACT_APP_GOOGLE_API_KEY={GOOGLE_API_KEY}
- Open terminal and run
npm install
(this will install the required dependencies) - Run
npm start
Please contact afian@afi.io if you have any questions or suggestions. Pull requests are welcome.