Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

Build: Express Routing for HTML and API #9

Closed
Tracked by #2
ErikPlachta opened this issue Jan 22, 2022 · 3 comments · Fixed by #14
Closed
Tracked by #2

Build: Express Routing for HTML and API #9

ErikPlachta opened this issue Jan 22, 2022 · 3 comments · Fixed by #14
Assignees
Labels
enhancement New feature or request

Comments

@ErikPlachta
Copy link
Owner

ErikPlachta commented Jan 22, 2022

The following HTML routes should be created:

    • GET /notes should return the notes.html file.
    • GET * should return the index.html file.

The following API routes should be created:

    • GET /api/notes should read the db.json file and return all saved notes as JSON.
    • POST /api/notes should receive a new note to save on the request body, add it to the db.json file, and then return the new note to the client. You'll need to find a way to give each note a unique id when it's saved (look into npm packages that could do this for you).
@ErikPlachta ErikPlachta self-assigned this Jan 22, 2022
@ErikPlachta ErikPlachta added this to the Completed Projected milestone Jan 22, 2022
@ErikPlachta ErikPlachta added the enhancement New feature or request label Jan 22, 2022
@ErikPlachta
Copy link
Owner Author

Setup framework for a basic server.js and routing infrastructure.

@ErikPlachta
Copy link
Owner Author

Everything built and verified in server.js as working. Waiting to close until I merge with dev

@ErikPlachta
Copy link
Owner Author

Basic fully-working concept good

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant