Skip to main content

How to run the backend

Start the Kotlin/JVM backend service for local development.

Prerequisites

  • JDK 21 installed
  • PostgreSQL accessible (via port-forward or local instance)

Steps

Step 1: Set environment variables

export DATABASE_URL="jdbc:postgresql://localhost:5432/aucert"
export DATABASE_USER="aucert"
export DATABASE_PASSWORD="<from-key-vault>"

Step 2: Start the backend

cd backend/platform
./gradlew bootRun

Verify: server starts on http://localhost:8080. Check health: curl http://localhost:8080/health.

Step 3: Run tests

./gradlew test

Verify: all tests pass.

If Tilt is configured, it provides hot-reload:

tilt up

Tilt watches for file changes and automatically rebuilds and restarts the backend.

Troubleshooting

"Connection refused" on database — Ensure PostgreSQL is accessible. Port-forward from AKS: kubectl port-forward -n aucert-dev svc/product-pg 5432:5432.

"Class not found" errors — Clean build: ./gradlew clean build.

What's next