Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 1.53 KB

README.md

File metadata and controls

20 lines (15 loc) · 1.53 KB

Hotel Room Booking API - ExpressBook

A Node.js, Express.js, and MongoDB-based API for booking hotel rooms.

Features

  • Fetch available rooms
  • Book rooms (allowing simultaneous booking by two users)

Application Workflow

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