This project using Nodejs and MongoDB Atlas to create API. It uses the MVC structure.
This is the first update on July 25, 2023. We will update if there is a change in the resource.
You can install nodejs at https://nodejs.org/en and choose the appropriate version. We recommend you to choose the version recommended by Nodejs.
- Open terminal and point to an existing empty directory or create a new one.
- Use "git clone https://github.com/hoadesign09/API-BookingHotel.git" command to clone project
- After cloned the project, open the folder with any editor you have, then change the "MONGO" and "JWT" attribute in the ".env" file available in the source code. (The "MONGO" attribute is the path to your own Mongo Atlas and the "JWT" property is initialized by you by the command "openssl rand -base64 32")
- After the changes are done, launch the command "npm start" and enjoy.
Note: If you have problems while resetting the project, contact me via my mail.
"Do not hesitate to approach the higher levels of knowledge."
- Create method
- Update method
- Detele method
- GetAll method
- GetById method
- CountByCity method
- CountByType method
- Create method
- Update method
- Detele method
- GetAll method
- GetById method
- Create method
- Update method
- Detele method
- GetAll method
- GetById method
- Init Token and Authentication
- Authorization account