A full-stack app for making reservations with optimized back-end
- https://github.com/SDC-4Head/sdc-image-gallery2
- https://github.com/SDC-4Head/sdc-recommends
- https://github.com/SDC-4Head/hrsf107-fec-booking
ROUTE | METHOD |
---|---|
/api/reviews/rooms/:roomId | GET |
/api/reviews/rooms/:roomId | PUT |
/api/reviews/rooms/:roomId | POST |
/api/reviews/rooms/:roomId | DELETE |
- Node 11.6.0
- About 5GB available storage
- Redis
- PostgreSQL
- Clone repo to your desktop.
- Go to your terminal and navigate to root directory of repo, then execute
npm install
to install dependencies. - Configure the
pool
variable in thepool.js
file of thedb
folder to the settings for your PostgreSQL on your computer. - Start up PostgreSQL server on your computer.
- In your terminal at the root diretory, execute
npm run generate-pg
. This will generate 3 files of data:review.csv
,user.csv
, androom.csv
. - Once completed, execute
npm run populate-pg
. This will populate your PostgreSQL database with the generated data. - Start up your Redis server on your computer.
- Open two tabs in your terminal. At the root directory, execute
npm start
in one terminal andnpm run build
in the other terminal. - Visit
http://localhost:3124
in your browser to see the reviews.