Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 1.3 KB

README.md

File metadata and controls

28 lines (22 loc) · 1.3 KB

Hotel Booking API with Node.js and Express.js

Introduction

This project is a hotel booking API built with Node.js and Express.js. It includes user authentication with JWT role-based authorization verification system and error handling best practices to ensure a secure and seamless experience.

Features

The following are the features of the hotel booking API:

  • User authentication with JWT role-based authorization verification system.
  • Error handling best practices to ensure a seamless experience.
  • CRUD operations for hotels, rooms, bookings, and users.

Installation

  • Clone the repository: git clone https://github.com/<your-username>/hotel-booking-api.git
  • Install dependencies: npm install
  • Create a .env file and add the following variables:
    • MONGO_URI: the URI for the MongoDB database.
    • JWT: the secret key for JWT token signing.
  • Start the server: npm start

Technologies Used

  • Node.js
  • Express.js
  • MongoDB
  • JWT

Conclusion

This hotel booking API is a secure and efficient tool for booking hotel rooms. It includes user authentication with JWT role-based authorization verification system, error handling best practices. With the use of Node.js and Express.js, it provides a fast and reliable performance while using MongoDB as its database for efficient data storage.