In this activity you will build the backend for a note-taking app.
-
Update the server.js file to include the following six routes.
-
Save a note to the database's collection
POST: /submit
. -
Retrieve all notes from the database's collection
GET: /all
. -
Retrieve one note in the database's collection by it's ObjectId
GET: /find/:id
. -
Update one note in the database's collection by it's ObjectId
POST: /update/:id
. -
Delete one note from the database's collection by it's ObjectId
DELETE: /delete/:id
. -
Clear the entire note collection
DELETE: /clearall
.
- You can see a list of methods available to you here. https:github.com/mafintosh/mongojs#api.