Making an impact on the health of Babies And Mothers
If using IntelliJ, "Import Project", and select the build.gradle file. This will build and set up IntelliJ for the project.
Alternative method: you can run this command to generate an "ipr" file that can be opened:
~/projects/healthbam $ ./gradlew idea
~/projects/healthbam $ ./gradlew build
You must have a postgres DB to use when running locally.
First, connect to the local DBMS from your project's top level directory (same directory as this README):
~/projects/healthbam $ psql postgres
Next, initialize the user & database with the local-setup.sql:
postgres=# \i database/local-setup.sql
Last, quit out of the psql shell:
hmhb_db=# \q
Note: If you want to start over, you can use the local-drop-everything.sql script to clean up the user & database created to start fresh.
Create a .env file to the top level directory of this project with the PORT to serve and JDBC_DATABASE_URL:
PORT=8080
JDBC_DATABASE_URL="jdbc:postgresql://localhost:5432/hmhb_db"
GOOGLE_OAUTH_CLIENT_ID="259324353484-f8u4ltb5qko7fltub68dguhs16ae93nr.apps.googleusercontent.com"
GOOGLE_OAUTH_CLIENT_SECRET="<secret>"
HMHB_JWT_SECRET="<also secret>"
Now you can run the latest code you have built locally with:
~/projects/healthbam $ heroku local
Endpoints providing information on:
- Health Check: Local / Heroku
- Logs: Local / Heroku
- Java Heap Dump: Local / Heroku
- Java Thread Dump: Local / Heroku
- Environment Variables: Local / Heroku
- Metrics Local / Heroku
- Application Info: Local / Heroku
- Trace Info Of The Last 100 Requests: Local / Heroku
- Spring Config Beans: Local / Heroku
- Spring Beans: Local / Heroku
- Spring MVC Request Mappings: Local / Heroku
- Spring Boot Autoconfig Info: Local / Heroku
- Documenation For These Endpoints: Local / Heroku