Skip to content

htoann/Hotel-Booking

Repository files navigation

✈ 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