An application that can be used to write, save, and delete notes. This application will use an express backend and save and retrieve note data from a JSON file.
-
The following HTML routes should be created:
-
GET
/notes- Should return thenotes.htmlfile. -
GET
*- Should return theindex.htmlfile
-
-
The application should have a
db.jsonfile on the backend that will be used to store and retrieve notes using thefsmodule. -
The following API routes should be created:
-
GET
/api/notes- Should read thedb.jsonfile and return all saved notes as JSON. -
POST
/api/notes- Should receive a new note to save on the request body, add it to thedb.jsonfile, and then return the new note to the client. -
DELETE
/api/notes/:id- Should receive a query parameter containing the id of a note to delete. This means you'll need to find a way to give each note a uniqueidwhen it's saved. In order to delete a note, you'll need to read all notes from thedb.jsonfile, remove the note with the givenidproperty, and then rewrite the notes to thedb.jsonfile.
-
AS A user, I want to be able to write and save notes
I WANT to be able to delete notes I've written before
SO THAT I can organize my thoughts and keep track of tasks I need to complete
For users that need to keep track of a lot of information, it's easy to forget or be unable to recall something important. Being able to take persistent notes allows users to have written information available when needed.
Application should allow users to create and save notes.
Application should allow users to view previously saved notes.
Application should allow users to delete previously saved notes.