This sample repository is for demo purposes and my way of learning about Node.js, Express.js and MongoDB.
The basic idea is to build and MVC based API and learn about how Node.js, Express.js, MongoDB and Mongoose module works together.
-
Basic understanding of how Node.js, Express.js, and MongoDB.
-
A running instance of MongoDB (in this case MacOS): Install MongoDB Community Edition on OS X
-
Download Postman to test and work with our API - Postman Download
-
Clone the repository node-mvc-api from Github or
git clone https://github.com/cbroberg/node-mvc-api.git
, and runnpm install
-
Open node-mvc-api in your preferred text editor (did anyone mention Atom), and run
npm start
-
Run
mongod
to launch the MongoDB daemon and you should be set to go!
Added support and tested MongoDB on https://mlab.com/databases/odeum_api - new connection is in app.js and both the new and the old localhost connection is located in alternative_db.js
Check out the Mongoose documentation.