Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Playlist

This is a backend application for managing a music list.

Technologies

How to run locally

1 - Clone this repository;

  git clone 

2 - Install all dependencies;

  npm install

3- Create a PostgreSQL database with the given dump.sql;

4 - Change the database connection informations;

5- Run to start application;

  npm run dev

Routes (CRUD)

1 - 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.

About

This is a backend application for managing a music list.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages