This is the backend of the SnowballR application.
First, provide a .env
file with all required environment variables shown in the section below.
As the server assumes a database to be running, we first need to start the database.
The best way to do this is to use the docker compose file. Run it with docker compose up
.
If the database is up and running, we can start the server. This can either be done by executing the built JAR file or
by using the Gradle command:
java -jar build/libs/snowballr-backend-<version>.jar
# or
./gradlew run
If you're using IntelliJ IDEA, you can use the added run configuration "Run Backend", which does the same as executing
./gradlew run
.
# Format files
./gradlew formatKotlin
# Verify formatting
./gradlew lintKotlin
./gradlew detekt
./gradlew test
./gradlew jar
# Jar can be found in build/libs/snowballr-backend-<version>.jar
Variable | Required | Default | Description |
---|---|---|---|
PORT |
✅ | - | The port where the backend is served |
LOG_LEVEL |
❌ | DEBUG |
The log level to use. One of TRACE , DEBUG , INFO , WARN , ERROR , or OFF |
DATABASE_PASSWORD |
✅ | - | Password for the database e.g. postgres_password |