Final project for Resilia Educação's fourth module. This API consists on auditoriums (rooms) in a movie theater and details from them.
** Please, ignore GitHub Pages... It wans't supposed to be on, oops! x_x
Clone the project using a terminal
git clone https://github.com/thaissilvr/cinema-aud-m4.git
Access the project directory
cd cinema-aud-m4
Install depedencies
npm install
Run the server
npm run dev
This is a REST API, containing all the HTTP verbs: GET, POST, PUT and DELETE. The structure from each verb can be found below:
GET: /auditorium
GET: /auditorium/:id
POST: /auditorium
PUT: /auditorium/:id
DELETE: /auditorium
{
"id": 1,
"room_number": 1,
"type": "2D",
"seats_av": 30,
"total_capacity": 40
},
{
"id": 2,
"room_number": 2,
"type": "2D",
"seats_av": 40,
"total_capacity": 40
},
{
"id": 3,
"room_number": 3,
"type": "3D",
"seats_av": 25,
"total_capacity": 40
}
Return id = 3
{
"id": 3,
"room_number": 3,
"type": "3D",
"seats_av": 25,
"total_capacity": 40
}
Deleting id = 3
{
"msg" : "Id deleted successfully",
"error" : false
}
{
"id": 4,
"room_number": 3,
"type": "3D",
"seats_av": 27,
"total_capacity": 40
}
{
"id": 4,
"room_number": 3,
"type": "3D",
"seats_av": 27,
"total_capacity": 40
}
npm run test