This is a backend application for managing a music list.
1 - Clone this repository;
git clone 2 - Install all dependencies;
npm install3- Create a PostgreSQL database with the given dump.sql;
4 - Change the database connection informations;
5- Run to start application;
npm run dev1 - Create : POST a body in the route http://localhost:4000/playlist:
body: {
"title": "nome da musica",
"artist": "nome do artista",
"genre":"genero musical",
"album":"album"
}2- Read: GET an array of musics in http://localhost:4000/playlist. For an array filtered by album GET by passing an album name by params: http://localhost:4000/playlist/:album.
3- Update: send an PUT request with a body to http://localhost:4000/playlist/:id specifying the id of the music to be edited by params. To add a music as a favorite status:
body: {
"isFavorite": true
}To remove a music as a favorite status:
body: {
"isFavorite": false
}4- Delete: send a delete request to http://localhost:4000/playlist/:id specifying the id of the music to be deleted by params.