GithubHelp home page GithubHelp logo

mdjawedh022 / pace_dream Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 24 KB

Manage hotel data effortlessly with the PaceDream Hotel Backend API. Built on Node.js and MongoDB, it enables users to create detailed hotel entries, including amenities, pricing, and location. Accessible , the API offers simple endpoints for posting and retrieving hotel information.

Home Page: https://pacedream.onrender.com/

JavaScript 100.00%
expessjs mongodb mongoose nodejs nodemon cors

pace_dream's Introduction

PaceDream Hotel Backend API ##

Welcome to the PaceDream Hotel Backend API! This API is designed to handle hotel-related data, providing endpoints for posting and retrieving hotel information.

Getting Started
To run this project locally, follow these steps:

Prerequisites
Node.js installed on your machine
MongoDB installed and running
Installation
Clone the repository:

bash

git clone
Install dependencies:
cd
npm install
Set up environment variables:

Create a .env file in the root directory and add the following variables:
makefile
PORT=
MONGO_URI=
Running the Application
Start the server:

npm start
Save to grepper
The server will run on the specified port, and you should see the message "Server is running at the port ".
API Endpoints

  1. POST /api/hotel/post
    Create a new hotel entry.

Request:

{ "name": "Hotel ABC",
"image": ["url1", "url2"],
"description": "Lorem ipsum...",
"offered": { ... },
"standout_amenities": { ... },
"describes_your_place": { ... },
"room_status": { ... },
"gender": "both",
"guests": 4,
"bedrooms": 2,
"beds": 3,
"bathrooms": 2,
"price_by": [ ... ],
"set_price": { ... },
"location": {
"type": "Point",
"coordinates": [longitude, latitude]
}
}
Response:

{ "msg": "Data sent successfully! ๐Ÿ˜Š",
"hotelData": { ... }
}
2. GET /api/hotel
Retrieve all hotel entries.
Response:
[
{
"_id": "12345",
"name": "Hotel ABC",
"image": ["url1", "url2"],
"description": "Lorem ipsum...",
"offered": { ... },
"standout_amenities": { ... },
"describes_your_place": { ... },
"room_status": { ... },
"gender": "both",
"guests": 4,
"bedrooms": 2,
"beds": 3,
"bathrooms": 2,
"price_by": [ ... ],
"set_price": { ... },
"location": {
"type": "Point",
"coordinates": [longitude, latitude]
},
"createdAt": "timestamp",
"updatedAt": "timestamp"
},
// ... other hotel entries ]
Deployment
The API is deployed at https://pacedream.onrender.com/.

Tech-stack Used
Node.js
Express.js
MongoDB
Mongoose
CORS
Contributing
Feel free to contribute by submitting issues or pull requests.

pace_dream's People

Contributors

mdjawedh022 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.