EHotels Web Application for CSI 2531 Final Project Built with React.js for frontend, Node.js and Express for backend, and PostgreSQL for the database.
Please create a database, we suggest naming it ehotel. Then execute the queries in data.sql.
Make sure that the database is running on port 5432
- In the command line interface, navigate to
/frontenddirectory by running the commandcd frontend. - Run
npm ito install the required modules - Run
npm startto activate the front-end part. To stop the application, run commandCtrl + C.
Make sure the front-end application run on http://localhost:3000
- Navigate to
/backenddirectory by runningcd backend. If you are previously in/frontenddirectory, go back to the main directory by runningcd ../. - Create an
.envfile in the/backenddirectory and include the following information
POSTGRES_USER = "postgres" //change it to your postgresql user
HOST = "localhost"
DATABASE = "ehotel" // change it accordingly to your database name
PASSWORD = "12345" // change it to your postgresql user password
jwtSecret = "secret"
- Run
npm ito install the required dependencies. Then runnpm i nodemonto install Nodemon. - Run
nodemon indexto start the backend server. To terminate the server, runCtrl + Cin the command line.
Make sure the back-end application run on http://localhost:4000