Read the instructions below.
- Make sure you run npm i in the root of the folder
- You need to install the modules NOTE: work in only App.js file GET Request This Get Request should be able to retrieve the following: GET - these are the routes you have to code it out
- Get all artists
- Get all artists without albumsArray and topSongs
- Get artist by ID
- Get artist's album by ID
- Get artist's topSongs by ID
- If the artist or the song or the album does not exist, send a message back "Sorry, the {XXXX} you are looking does not exist". {XXXX} - means dynamic - e.g Sorry, the artist you are looking does not exist This Post Request should be able to create the following: Post - these are the routes you have to code it out
- Create new artists
- Create new album
- Create new top songs This Put Request should be able to update the following: Put - these are the routes you have to code it out NOTE: Remember the spread operator!
- Update artist name + other informations
- Update album name + other informations
- Update song name + other informations
- If the artist or the song or the album does not exist, send a message back "Sorry, the {XXXX} you trying to update does not exist". {XXXX} - means dynamic - e.g Sorry, the artist you are trying to update does not exist This Delete Request should be able to Delete the following: Delete - these are the routes you have to code it out
- Delete artist
- Delete albums
- Delete topSongs
- If the artist or the song or the album does not exist, send a message back "Sorry, the {XXXX} you are trying to delete does not exist". {XXXX} - means dynamic - e.g Sorry, the artist you are trying to delete does not exist Bonus: Refactor the routes to its folder. Refer back to Wednesday lesson!