A Node.js, Express.js, and MongoDB-based API for booking hotel rooms.
Step | Description | Screenshot |
---|---|---|
1. | Run addData.js to populate the database with 500 vacant rooms. |
|
500 room documents have been added to the database. | ||
2. | Start the application by running app.js and make a GET request to view available rooms. |
|
3. | To book a room, make a POST request and specify the desired room number. | |
The room status changes to "booked." | ||
4. | When making another GET request, the booked room (e.g., Room 500) will not appear in the available list. | |
Room No. 500 has been successfully booked. |