Introduction Service to BnB
These are the steps to get up and running with my service 👍
Make sure you have installed the following prerequesites on your development machine:
- Git - Download & Install Git. OSX and Linux machines typically have this already installed.
- Node.js - Download & Install Node.js and the npm package manager. If you encounter any problems, you can also use this GitHub Gist to install Node.js.
- postgreSQL server - Installation docs for: macOS, Windows, for WSL - Ubuntu 18.04
- Make sure PostgreSQL server is running -
- Clone repository
git clone https://github.com/Epona-SDC/melvin-service.git
- Install dependencies
npm install
-
Create index.js in the config directory
- In your config/index.js add the following code, with your own credentials:
module.exports = { postgresPassword: `yourPassword`, postgresUsername: `userName`, };
- Once your credentials are in this config file you can proceed to the next step.
-
Run csv data builder
npm run build-data
-
Create database
npm run create-db
-
Import data on postgreSQL CLI
- From the project's directory change current folder database/data
cd database/data
- Open postgres CLI
sudo -u postgres psql
- Run the sql script, to connect to and populate airbnblisting database. Enter the following:
\i populateAirbnbListing.sql
-
Build webpack bundle
npm run build
-
Start express server
npm run server
The service will then run on http://localhost:3002. Bundle.js file should also be in http://localhost:3002/app.js
- Needs Readme for Artillery usage- See Enhancement Issue
- React
- Express
- postgreSQL
- Jest
- webpack
- Artillery