Photo backend.
Resource server for hilfling app>
First install required developer SDKs
First install required packages:
- Kotlin
- Maven
- KTLint
Then run:
mvn clean install
Run the command. This will run all the necessary services for the backend, including the hilfling service itself.
docker-compose up -d
Run the command mentioned below. This will run all necessary services for the backend, except the hilfling service itself.
docker-compose -f docker-compose.dev up -d
This means in order to start the hilfing service you must run the following command:
mvn spring-boot:run
To use prod database
mvn spring-boot:run -Drun.profiles=prod
This project use KTlint to keep code formatting consistent.
To check linting run:
ktlint .
To automaticly fix formatting run:
ktlint --format .
To install git pre-commit hook and avoid commits that do not follow formatting guidelines run:
ktlint --install-git-pre-commit-hook
mvn package
run the built package
java --jar target/hilfling-0.0.1.SNAPSHOT.jar
To specify a different database connection
Set these environment variables:
export LISTENING_IP=localhost
export LISTENING_PORT=8080
export DATABASE_USERNAME=<username>
export DATABASE_PASSWORD=<password>
export DATABASE_URL=jdbc:postgresql://<ip:port>/<database name>
export DATABASE_DRIVER=org.postgresql.Driver
https://www.baeldung.com/spring-properties-file-outside-jar
mvn spring-boot:build-image
https://www.baeldung.com/kotlin-speek
localhost:5050
username: [email protected]
password: password
hostname:hilflingdb
username:hilfling
password:password