Click on "Use this template", clone the repo locally and solve the exercises in routes/jokes.js
.
Remember to run npm i
.
Use node index.js
to start the server.
Create a GET
/joke
route, that returns all jokes.
Test it with the REST Client VS Code Extension.
Create a GET
/joke/:id
route, that returns the joke for the given id.
Test it with REST Client.
Create a POST
/joke
route, that adds a new joke to the array.
Test it with REST Client.
Create a PATCH
/joke/:id
route, that updates the joke for the given id.
Test it with REST Client.
Create a DELETE
/joke/:id
route, that deletes the joke for the given id.
Test it with REST Client.