/chalkling

Messaging app for Study Groups.

Primary LanguageJava

chalkling

Authors: Jan Garong, Yining Wang, Ruo Ning (Nancy) Qiu

Server Setup:

  1. Run mvn clean install to generate a jar file. If this does not work, try running ./mvnw clean install (for MacOS/Linux) or mvnw clean install on windows.
  2. Run heroku local web to run the jar file on the web locally on your computer.

Local PostgreSQL Setup

  1. Use brew to install PostgreSQL in the terminal: brew install postgresql
  2. Once it is installed, enter the command: brew services start postgresql
  3. Go to Intellij Database, add a new PostgreSQL Datasource by clicking the + sign, it should automatically add the same localhost for you. Click Test Connection to ensure it is working.
  4. You must have the PostgreSQL running in the back for test cases to run. To stop it, enter the command: brew services stop postgresql

Testing Setup: We are using local PostgreSQL database for testing, ensure you have followed the previous setup.

  • For running the main locally, we need to do the following in java/resources/application.properties:
    1. Comment out: spring.datasource.url: ${JDBC_DATABASE_URL:}
    2. Uncomment: spring.datasource.url: jdbc:postgresql://localhost:5432/postgres
  • For testing with the heroku database, we need to hardcode with the url by changing application.properties correspondingly

Resources used: