A simple ToDo list example API using Node, Express, and MongoDB. See Usage for sample cURL commands below.
Install node via Homebrew:
brew install node
Install MongoDB via Homebrew:
brew install mongodb
Then, install Node modules:
npm install
Give it a go!
npm start
If all goes well you will see the output below in your console log:
Listening on port: 3000
curl -i -X POST \
http://localhost:3000/tasks \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d name=Take%20Bart%20for%20a%20walk
curl -i -X GET http://localhost:3000/tasks
- Node.js - Javascript runtime
- Express.js - Web framework
- MongoDB - To store data documents
- Mongoose - MongoDB ORM
- Body-parser - To parse incoming requests