A simple movie organizer. Save the movies you've watched or want to watch.
This is a backend project with which many people can manage their favorite movies. Below are the implemented features:
- Save a movie
- It can be watched or not watched
- Save which stream the movie belongs to
- See, update and delete your movies
By using this app any user can see which movies they've been watching and track/save your favorites.
The following tools and frameworks were used in the construction of the project:
- Clone this repository
- Install all dependencies
npm i
- Create a .env file and fill information based in the .env.example file (you can use localhost for the POSTGRES_HOST)
- Create a database in Postgres connection
- Populate the database by running the commands within dump.sql file
In order to run it locally, run:
npm run dev
POST /movies/
Body: { "name": "It, a coisa", "streaming": "Netflix", "genre": "Horror", "status": "Not watched" }
HTTP/1.1 201 CREATED
Status: 201 CREATED
GET /movies
HTTP/1.1 200 OK
Status: 200 OK
data: [
{
"id": 1,
"name": "It, a coisa",
"streaming": "Netflix",
"genre": "Horror",
"status": "Not watched"
},
{
"id": 2,
"name": "Supeman",
"streaming": "HBO Max",
"genre": "Action",
"status": "Watched"
}
]
DELETE /movies/:id
HTTP/1.1 202 Accepted
Status: 202 Accepted
data: "Accepted"
PUT /movies/:id
Body:
{
"name": "It, a coisa 2",
"streaming": "Netflix",
"genre": "Horror",
"status": "Watched"
}
HTTP/1.1 202 ACCEPTED
Status: 202 ACCEPTED