Congratulations, you have made our glorious Express Yourself Machine fully operational! Not only that, you now have all the tools you need to create a basic CRUD API! Time to practice your skills with a new set of routes.
You are going to add an additional set of functionality to our machine: Animal Mode! This will involve creating similar GET, POST, PUT, and DELETE routes.
Instructions
In your app.js file, Create a GET /animals
route to return an array of all animals.
Create a GET /animals/:id
route to respond with a single animal.
Create a PUT /animals/:id
route to update an animal in animals
and send back the updated animal.
Create a POST /animals
route to add new animals to the animals
and respond with the new animal.
Create a DELETE /animals/:id
route to delete animals by ID.