A restful API for the curtain twitcher app.
You can visit the API and make GET requests at https://curtain-twitcher.herokuapp.com
- To get all crimes for a specified area:
GET /api/crimes?lng=<longitude>&lat=<latitude>
- To get all crime trends for a specified area:
GET /api/crimes/trends?lng=<longitude>&lat=<latitude>
- To get all schools for a specified area:
GET /api/schools?lng=<longitude>&lat=<latitude>
- Optional queries are:
?dis=<distance in miles>
You will need node.js, npm, mongo and mongod installed to run this application locally.
To check you have node.js installed, in the terminal run:
node -v
If you do not have node installed, see the following guide to help you.
To check you have npm installed, in the terminal run:
npm -v
If you do not have npm installed, see the following guide to help you.
To check you have mongoDB installed, in the terminal run:
npm list mongoose
If you do not have mongoDB installed, see the following guide to help you.
Clone this repo to your local machine:
https://github.com/CurtainTwitcher/BE-curtain-twitcher.git
Navigate into the new directory and install dependencies:
npm install
To seed the database, in a seperate terminal window run mongod
.
To run the seed file:
npm run seed:development
To run the tests, in the terminal run:
npm test
- Harry Crank
- Oliver Theabould
See the entire project at Curtain Twitcher who participated in this project.