From d391ce632be29c49a612c64eb5f720238a46844d Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Fri, 17 Jan 2025 16:15:56 +0100 Subject: feat(server): Add all in one http server --- .../src/main/kotlin/moe/nea/ledger/server/aio/AIO.kt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 server/aio/src/main/kotlin/moe/nea/ledger/server/aio/AIO.kt (limited to 'server/aio/src/main') 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 -- cgit