Skip to content

Estate360/Hotel_Management_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hotel Management System API

This is a basic implementation of of CRUD (Create, Read, Update and Delete).

A backend API built using NodeJS and ExpressJS for a hotel management system. The API provides endpoints for managing room types and rooms.

Technologies Used

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Installation

  1. Run git clone https://github.com/Estate360/Hotel_Management_API to clone the repository to your local machine.

  2. Run cd hotel-management-api to navigate to the cloned repository directory.

  3. Run npm install to install the required dependencies.

Optionally, you can; Create a .env file and add the following environment variables: DATABASE=mongodb+srv://:@cluster0.ynrdrfw.mongodb.net/Hotel-Management?retryWrites=true&w=majority PORT=5000

  1. Run npm run dev to start the server.

The API should now be running at http://localhost:5000 or http://localhost:8800.

API Endpoints

The API provides the following endpoints:

  • POST /api/v1/room-types: Creates a new room type
  • GET /api/v1/room-types: Gets all room types
  • POST /api/v1/rooms: Creates a new room
  • GET /api/v1/rooms: Gets all rooms with optional filters: search, roomType, minPrice, and maxPrice
  • PATCH /api/v1/rooms/:id : Updates a room
  • DELETE /api/v1/rooms/:id : Deletes a room
  • GET /api/v1/rooms/:id : Gets a room by ID

Contributing

If you're interested in contributing to this project, please feel free to fork the repository and make any changes you like. Once you're ready, submit a pull request to have your changes reviewed and merged into the main branch.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

Leave a Star ⭐️ if you find this helpful or worth a Start

About

This is a basic implementation of of CRUD (Create, Read, Update and Delete).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published