Skip to content

Stream real-time data for stock tickers to make more profitable trades

Notifications You must be signed in to change notification settings

mitchthebaker/smart-buy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Smart-buy

Welcome! This repository is set up with react client, Node.js REST API, and PostgreSQL database.

Setup

Clone the project

cd into ./api-gateway and create .env file

Inside .env, add:

  NODE_ENV=development
  PORT=3001

  PG_USER=admin
  PG_HOST=server_db
  PG_DB=db
  PG_PASSWORD=secret
  PG_PORT=5432

cd into ./client-app and create .env file

Inside .env, add:

  NODE_ENV=development
  REACT_APP_API_GATEWAY_URI=http://localhost:3001

Update env variables in docker-compose.yml

  pgadmin:
    container_name: pgadmin
    image: dpage/pgadmin4
    environment: 
      PGADMIN_DEFAULT_EMAIL: admin@admin.com
      PGADMIN_DEFAULT_PASSWORD: secret
      PGADMIN_LISTEN_PORT: 80
    ports: 
      - "3201:80"

Next, add a new server in pgadmin to perform queries against the database.

Open up pgadmin at http://localhost:3201

Login with the credentials

  • PGADMIN_DEFAULT_EMAIL
  • PGADMIN_DEFAULT_PASSWORD

Next, click on Add New Server

Image for Add New Server

In the modal that pops up, enter a name under the General tab.

Image for Name in General Tab

Click on the Connection tab

For Hostname/address, set this to server_db which is the container_name for server-db in docker-compose.yml.

Next, for the port input 5432

Then, update the Username to admin.

Then, update the Password to secret.

Lastly, click save.

Image for Updating Connection Tab

If you haven't already install docker-compose here

https://docs.docker.com/compose/install/

start the app with docker-compose up

About

Stream real-time data for stock tickers to make more profitable trades

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published