Skip to content

SE-UUlm/snowballr-backend

Repository files navigation

SnowballR Backend

This is the backend of the SnowballR application.

Commands

Starting the server

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.

Formatting

# Format files
./gradlew formatKotlin

# Verify formatting
./gradlew lintKotlin

Linting

./gradlew detekt

Testing

./gradlew test

Build Jar

./gradlew jar
# Jar can be found in build/libs/snowballr-backend-<version>.jar

Environment Variables

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

About

SnowballR Backend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages