Service-Oriented Architecture app modeled from the Airbnb Reviews service, built to:
- seed and persist data (averages, users, and reviews) for 100 unique product IDs,
- run alongside other services via proxy server,
- display a full page of data per each unique product ID,
- run locally, or be deployed via Amazon EC2.
Built with the MERN stack using MongoDB, as well as React Styled-Components and React Router DOM.
git clone
- install dependencies with
npm install
- seed database with
npm run seed
- start server with
npm run start
- build bundle with
npm run build
- verify app up and running at
localhost:3001/rooms/:id
(for id values 0-99) - for development, start webpack with
npm run react-dev
- create and launch EC2 instance with Ubuntu AMI on t2 micro (or preferred settings)
- edit Instance Inbound Rules by adding "All Traffic" from "Anywhere," or preferred security settings
- add pem key to root and .gitignore, and in Terminal make pem private with
chmod 400 [.pem file]
- connect to instance with
ssh -i "[pemKeyName].pem" ubuntu@[Public IPv4 DNS]
NOTE: Public IPv4 address will change every time instance shuts down. To avoid repeated IP changes during development, restart instance instead of shutting down. - install Node on Ubuntu with
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
. ~/.nvm/nvm.sh
nvm install node
- install Git on Ubuntu with
sudo apt-get install
git clone
repo- install dependencies with
npm install
- install MySQL with
sudo apt update
sudo apt-get install mysql-server -y
sudo mysql
create database [name]
- add MySQL credentials (
SQL_USER
,SQL_PASS
, &SQL_DB
) to root .env file withsudo vim .env
- seed database with
npm run seed
- start server with
npm run start
- verify app up and running at url
http://[Public IPv4 DNS]:3001/rooms/:id
(for id values 0-99). NOTE: must usehttp
, nothttps
, or will return error - to stop instance, go to instance page and click Instance State > Stop Instance.
Complete local or EC2 setup, and follow setup instructions for proxy.