htoann / Hotel-Booking

Hotel booking website using NextJS and NodeJS

Home Page:https://bookingroom.tech

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

✈ Hotel Booking 🏨

Find your next stay

Search deals on hotels, homes, and much more...

Clone or download

$ git clone https://github.com/htoann/Booking-Hotel.git
$ yarn # or npm i

Project structure

LICENSE
package.json
server/
   package.json
   .env (to create .env, check [prepare your secret session])
client/
   package.json
...

Usage

Notice, you need client and server runs concurrently in different terminal session, in order to make them talk to each other

Client side usage (PORT: 3000)

$ cd client
$ yarn # or npm i
$ npm run dev
// deployment for client app
$ npm run build
$ npm run start

Server side usage (PORT: 8000)

Prepare your secret

(You need to add a JWT_SECRET in .env to connect to MongoDB)

Start

$ cd server
$ npm i
$ npm run dev
$ npm run build

Deploy Server to Railway

Environment variables

# Client .env.local file
NEXT_PUBLIC_API_URL=http://localhost:8000/api
NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN=

# Server .env file
JWT_SECRET = 
MONGODB_URI = 
CLOUD_NAME = 
CLOUD_API_KEY = 
CLOUD_API_SECRET = 

Standard

JavaScript Style Guide

BUGs or comments

Create new Issues (preferred)

Author

Le Cong Ly

Tran Huu Toan

About

Hotel booking website using NextJS and NodeJS

https://bookingroom.tech

License:MIT License


Languages

Language:TypeScript 84.0%Language:JavaScript 15.3%Language:CSS 0.7%