AirBnB clone uses a server-size Javascript to display the information from queries to web pages via SQL queries.
- Node.js
- bcrypt
- cookie-session
- Express
- nodemon
- pg
- Clone this repo.
- Open terminal under
LightBnB
folder. - Requires Node Postgres, if you haven't install it. Enter this in terminal
npm install pg
- Start Node Postgres with
brew services start postgresql
- Enter
psql
- Create a user if you haven't with
CREATE ROLE vagrant LOGIN SUPERUSER PASSWORD '123';
- Create a new database with
CREATE DATABASE lightbnb;
- Enter
\c lightbnb
- Setup new tables with
\i migrations/01_schema.sql
- Setup the tables with dummy data with
\i seeds/02_seeds.sql
- Open a new terminal under
LightBnB
folder. - In your terminal enter
cd LightBnB_WebApp/
- Make sure npx is installed enter
npm install -g npx
- Install all dependencies by entering
npm i
- Run
npm run local
to run the app. - Go to your browser and enter 'http://localhost:8080'