Skip to content

Latest commit

 

History

History
76 lines (54 loc) · 3.07 KB

README.md

File metadata and controls

76 lines (54 loc) · 3.07 KB

Backend Server (Restful API server)

Console application that manage the access to the database and the CRUD operations in the database.

Development

The following tools were used for development.

  • JDK 11+ (Java Development Kit 11+)
  • IDE: Eclipse or IntelliJ
  • Java Framework: Springboot
  • Gradle 6.5
  • Postman: Generate JSON requests (for testing purposes)
  • PostgreSQL: Data storage
  • pgAdmin4: Admin console for PostgreSQL
  • Docker: Contains image of postgresql and pgAdmin4

Java Development Kit(JDK)

It is recommended to use JDK 11+. Download and install JDK.

Important: Make sure to set up the environment variables.

IDE: Eclipse or IntelliJ

We recommend using one of the following IDEs:

  • Eclipse: Eclipse IDE for Java Developers
  • IntelliJ: Community, Education or Ultimate edition. Important: Use version 2020.1 or later!

Gradle

We use gradle as a build tool Download gradle

Postman (optional)

Postman is a tool to create GET/POST/... requests. We recommend using it in order to debug the API.

Docker

We use Docker to run our development database.

HTTPS Setup

We are using HTTPS for connection so its important to import and trust the certificate to run the application

  • For mac - open keychain access file->import items-> choose keystore.p12 under /Backend/src/main/resources. Then double click on localhost and choose always trust option from the dialog.
  • For windows - double-click on keystore.p12 file under /Backend/src/main/resources and install it.
  • Password of certificate is "password"
  • To trust localhost by chrome go to chrome://flags/#allow-insecure-localhost and enable Allow invalid certificates for resources loaded from localhost option.

How to use

  • Install the below in-order
    • JDK 11+ and set environment variables
    • Install IDE and set the JDK path if needed
    • Install Docker
  • Clone this project
  • Do HTTPS setup
  • set configurations in Backend/ConfigProperties.java
  • set spring.jpa.hibernate.ddl-auto =``create-drop or update or none under /Backend/src/main/resource/application.properties
  • Run docker-compose up
  • Go to Digitact/Backend folder in the terminal and run gradle bootrun or
  • Run the Digitact/Backend/Application.java file using your preferred IDE

pgAdmin4

In order to view the content of the database, we ship pgAdmin4 with our docker-compose file. Open localhost:8080 to open pgAdmin4.

Log in using:

  • Email Address: example@example.com
  • Password: example

If you want to access the database, you are most likely prompted for a password. It is set to postgres by default.