Client side hotel reservation/booking web application.
- NodeJS.
- MySQL or MariaDB.
-
Download the project
Open a terminal and
cd
to the directory where you want to clone the project repository, then copy-paste the commands below in the terminal command line.git clone https://github.com/NelTeano/Hotel-Reservation.git cd Hotel-Reservation cd server npm install cd ../my-react-app npm install
-
Create a file called
.env
in theserver
folder. -
Paste this values inside
.env
file :MYSQL_HOST="<DATABASE HOST ADDRESS>" MYSQL_USER="<DATABASE USERNAME>" MYSQL_PASSWORD="<DATABASE USER PASSWORD>" MYSQL_DATABASE="<DATABASE NAME>" PORT="<PORT NUMBER TO USE>"
Here are some fixed
.env
values that this project uses:MYSQL_HOST="127.0.0.1"
MYSQL_USER="root"
MYSQL_DATABASE="hoteldb"
PORT="3001"
User defined
.env
values:MYSQL_PASSWORD=""
- The password you created for the root user during the installation of MySQL/MariaDB server.
-
Database set up - In your MySQL/MariaDB create a database named
hoteldb
, then import all the necessary tables for the project. -
Run the application
- Open two terminal command lines.
- Open the project's root directory for each terminal.
- In the first terminal enter the command
cd server && node app
. - In the second terminal enter the command
cd my-react-app && npm run start
. - Wait for both terminals to finish setting up.
-
Access the application
Open the address
localhost:3000
on a browser.