Node RESTful API with MongoDB — Example
1 min readJun 24, 2015
The whole server.js bacon:
Mongoose rocks, but we’ll be using mongojs for simplicity’s sake.
First, make sure you npm install your dependencies: express, body-parser, cors, and mongojs.
Then, since I don’t want to write a long blog post, here is the code to make magic happen:
Final note
Yay!