Skip to content

Code-4-Community/proj-bhchp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

258 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BHCHP Application and Admin Portal - Setup for local development

Setting up the database

Windows

  • Download PostgreSQL
  • Say yes/ or check the box when it asks if you want to install PgAdmin with it
  • Make username postgres, password can be anything you will remember

MacOS

  • You can use brew to install. You may need to install pgadmin separately, link
brew install postrgesql
  • Also you need to start postgres
brew services start postgresql
  • Make username postgres, password can be anything you will remember

To set up the database, open PgAdmin. Once you have set up your postgres credentials, right click on the Databases dropdown. You may need to create a Server first. You will need the default password for postgres to do this, which is root. Select “Create/-> “Database…”. Name the database exactly bhchp.

Adding tables and dummy data

You will need to run the migrations which adds the tables from the repo to your database

npm run migration:run 

Setting up the dependencies

  • Clone this repo
  • Run yarn at the root (in vscode) to install this project's dependencies.
  • You can optionally install nx globally with:
npm install -g nx
  • if you don't, you'll just need to prefix the commands below with npx (e.g. npx nx serve frontend).

Setting up your environment

  • Make a copy of example.env (in /apps/example.env)
  • Rename the copy to EXACTLY .env - If you name it anything else you risk leaking security credentials!

Running the application

  • To run just the frontend (port 4200):
nx serve frontend
  • To run just the backend (port 3000):
nx serve backend
  • Run both in the same terminal:
nx run-many -t serve -p frontend backend

Testing with Postman

  • Download Postman
  • Open postman
  • Set the parameter to GET
  • Enter http://localhost:3000/api
  • Press SEND
  • if the backend setup was successful, you should see a 200 OK response

About

Boston Health Care for the Homeless Program

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 97.5%
  • JavaScript 2.2%
  • Other 0.3%