This project is a starter template to build Single Page Applications using Kotlin (Spring Boot) and Svelte. It is bundled together using Gradle.
npx degit odytrice/kotlin-svelte my-appcd my-app./gradlew devYou can build and bundle the application with the following command
./gradlew bundle
Then you can copy the output bundle in ./.deploy
You can build a docker image using
docker build -t kotlin-svelte .
and then run it using
docker run -it -p 8080:8080 kotlin-svelte
Then visit http://localhost:8080
| Task | Description |
|---|---|
./gradlew build |
Builds both backend and frontend |
./gradlew dev |
Runs Spring Boot + Vite dev server in parallel |
./gradlew bundle |
Creates production bundle in .deploy/ |
./gradlew test |
Runs backend tests |
./gradlew buildClient |
Builds only the Svelte frontend |
./gradlew clean |
Cleans all build artifacts |