- fork this repository & create a new branch for your work
- write all of your code in a directory named
lab-
+<your name>
e.g.lab-susan
- push to your repository
- submit a pull request to this repository
- submit a link to your PR in canvas
- write a question and observation on canvas
- students will be able to work with application, router, and 3rd party middleware through the use of express.js
- students will be able to implement custom middleware through the use of express.js
- students will be able to create custom routers for a specific resource
package.json
.eslintrc
.gitignore
README.md
- your
README.md
should include detailed instructions on how to use your API
- your
- create a single resource
express
API that can handle GET, POST, and PUT requests - use the
http-errors
module to create new errors and associate them with a proper status code - create an
error-middleware
module to handle errors and use it in your server file - create a
cors-middleware
module that will allow for public use of your API - create the
deleteItem
andavailIDs
methods and add them to yourstorage
module- these methods should be used to delete a resource (
deleteItem
) and return an array of id's from persisted resource filenames (availIDs
)
- these methods should be used to delete a resource (
- create the
updateNote
,fetchNote
, andfetchIDs
static methods as part of yourNote
model - create a series of
note-route-tests
to test your GET, POST, and PUT routes- hint: you'll want to use the
before
andafter
hooks provided bymocha
in order to create a test note and delete the note after the test has completed
- hint: you'll want to use the