REST Api
My goal is to create a web api to access my records in db (crash sites).
I will build this api with Express - a minimalist web framework for Node.js. I will only implement two routes:
- the first one will list all crash sites (api/v1/crashes).
- the second will show all sites close to a specific location (/api/v1/crashes/:longitude/:latitude/:km). 3 parameters: longitude, latitude, and radius.
The access to my mongodb environment will be managed again by mongoose - the best mongodb api framework.
As usual, my api is deployed on heroku.