An Express API app returns planned journeys
Post:
<API_HOST>/api/v1/journeys/
with payload:
{
"region": "Scottish Highlands",
"dates": ["2020-12-01", "2020-12-14"],
"types": ["city", "outdoor"]
}
e.g.
http://localhost:5000/api/v1/directions/51.5710352,-0.09261149999999999/51.5452153,-0.07491830000000001
- node - v12.x
- npm
Install all dependencies with
npm i
Create an .env
file in the project root with TFL API credentials similar to
GOOGLE_API_KEY=<your_google_api_key>
Run
npm run start
npm run test:watch
Push to the heroku remote with:
git push heroku