Problem Statement: Develop a RESTful API for a simple note-taking application using Node.js and Express.js, with MongoDB as the database. The API should allow users to create, retrieve, update, and delete text notes.
Four functionalities as requested:
-
Create Note: Endpoint to add a new note to the database. Insomnia: MongoDB:
-
Retrieve Notes: Endpoint to get a list of all notes, with an option to retrieve a single note by its ID. Insomnia: Retrieve every note: Retrieve note by ID:
-
Update Note: Endpoint to update the content of an existing note. Insomnia: MongoDB:
-
Delete Note: Endpoint to delete a note from the database. Insomnia: