API that serves data from hotel bookings.
API that serves data with entity relationships for hotel bookings. Made with Express, Sequelize and MYSQL. Project from GeeksHubs Academy like Full stack developer student.
Entity-relationship diagram that was generated with MYSQL Workbench:
- Node.js: ^12.0.0
Install packages npm:
npm install
Start the dev server with this command:
npm run dev
Run http://localhost:3000/ in your borwser to do the tests.
Start the production server with this command:
npm start
Use the endpoints to navigate for the differents types of data of the API
| Method | Route | Description |
|---|---|---|
| Get | /customers | Show customers |
| Get | /customers/id | show customers by id |
| Get | /customers/name/name | Show customers by name |
| Get | /customers/lastname/lastname | show customers by lastname |
| Get | /customers/id_card/id_card | Show customers by id card |
| Get | /customers/phone/phone | show customers by phone |
| Get | /customers/email/email | Show customers by email |
| GET | Route | Description |
|---|---|---|
| Get | /hotel | Show hotel |
| Get | /hotel/id | show hotels by id |
| Get | /hotel/name/name | Show hotels by name |
| Get | /hotel/location/location | show hotels by location |
| Get | /hotel/city/city | Show hotels by city |
| GET | Route | Description |
|---|---|---|
| Get | /bookings | Show bookings |
| Get | /bookings/id | show bookings by id |
| Get | /bookings/checkin/chekin | Show bookings by chekings |
| Get | /bookings/checkout/checkout | show bookingd by checkout |

