diff options
Diffstat (limited to 'server/aio')
-rw-r--r-- | server/aio/build.gradle.kts | 19 | ||||
-rw-r--r-- | server/aio/src/main/kotlin/moe/nea/ledger/server/aio/AIO.kt | 20 |
2 files changed, 39 insertions, 0 deletions
diff --git a/server/aio/build.gradle.kts b/server/aio/build.gradle.kts new file mode 100644 index 0000000..22819f0 --- /dev/null +++ b/server/aio/build.gradle.kts @@ -0,0 +1,19 @@ +plugins { + kotlin("jvm") + application +} + +dependencies { + declareKtorVersion() + implementation(project(":server:core")) + implementation(project(":server:frontend")) +} + +java { + toolchain.languageVersion.set(JavaLanguageVersion.of(21)) +} + +application { + mainClass.set("moe.nea.ledger.server.core.ApplicationKt") +} + diff --git a/server/aio/src/main/kotlin/moe/nea/ledger/server/aio/AIO.kt b/server/aio/src/main/kotlin/moe/nea/ledger/server/aio/AIO.kt new file mode 100644 index 0000000..e59301f --- /dev/null +++ b/server/aio/src/main/kotlin/moe/nea/ledger/server/aio/AIO.kt @@ -0,0 +1,20 @@ +package moe.nea.ledger.server.aio + +import io.ktor.server.application.Application +import io.ktor.server.http.content.singlePageApplication +import io.ktor.server.routing.Routing +import moe.nea.ledger.server.core.AIOProvider + + +class AIO : AIOProvider { + override fun Routing.installExtraRouting() { + singlePageApplication { + useResources = true + filesPath = "ledger-web-dist" + defaultPage = "index.html" + } + } + + override fun Application.module() { + } +}
\ No newline at end of file |