- Developed a full-fledged REST API server with Express, MongoDB and Mongoose
- Serve up various REST API end points together with interaction with the MongoDB server.
-
Clone or download the repo. into any fresh temporary folder.
-
Cd into that root folder you just cloned locally.
-
Open terminal in the current folder and to install all dependencies type
npm install
- Now typing
npm start
- will start a server !
- MLab's MongoDB hosting platform is the fastest growing cloud Database-as-a-Service in the world. Get started with a free database and expert support.
- NPM is the default package manager for the JavaScript runtime environment Node.js.
"dependencies": {
"body-parser": "~1.15.1",
"cookie-parser": "~1.4.3",
"debug": "~2.2.0",
"express": "~4.13.4",
"jade": "~1.11.0",
"morgan": "~1.7.0",
"serve-favicon": "~2.3.0",
"mongoose-currency": "~0.2.0",
"mongoose": "~4.7.2"
}
- Postman extension can be used for testing !
- Supercharge your API workflow with Postman! Build, test, and document your APIs faster.
- You can now fire up postman and then perform several operations on the REST API.
- You can use the data for all the Routes dishes,promotions and leadership provided in the db.json file .
-
Create your branch:
git checkout -b my-new-feature
-
Commit your changes:
git commit -m 'Add some feature'
-
Push to the branch:
git push origin my-new-feature
-
Send a Pull Request
-
Enjoy!
- GET Request to URL localhost:3001/dishes/
- GET Request to URL localhost:3001/promotions