Build an API that creates a note and reads it back. Saving a note responds with 201, and a saved note can be found by id. Complete the two routes (POST /notes, GET /notes/:id) inside registerNoteRoutes. Note: save with noteRepo.save, read with noteRepo.findById, make ids with makeId() from the same file. POST /notes takes { title, body }.
Complete an Express + TypeScript API that creates a note and reads it back. POST /notes takes { title, body }, saves it, and responds 201; GET /notes/:id finds the saved note by id and returns it. Leave the store and global handler as given and fill in the two routes.
A data-creating API usually has two steps — save, then respond. This problem is about whether what you just created carries through to a later lookup — reading the same id back returns the same note. The habit that matters is confirming that creating a note responds 201 with the created note, and that a GET by that id returns the note you stored.