refactor: remove the server-rendered web UI
CI / chart (push) Successful in 3s
CI / chart-push (push) Successful in 3s
CI / test (push) Successful in 1m53s
CI / image (push) Successful in 4m12s

All browsing and mood management now live in the native client. Drop the
embedded HTML page, the WEB_UI setting, the /ui route and the chart env
entry; the server only exposes /api/v1, /health and a small root banner.
This commit is contained in:
TapTap committed 2026-11-14 19:36:43 +00:00
1 parent 54cf807a9b
commit bf6c9e7394
6 files changed
+7 -646

No files matched your search

@@ -16,7 +16,6 @@ import io.ktor.server.plugins.partialcontent.PartialContent
import io.ktor.server.plugins.statuspages.StatusPages
import io.ktor.server.request.path
import io.ktor.server.response.respond
import io.ktor.server.response.respondRedirect
import io.ktor.server.response.respondText
import io.ktor.server.routing.get
import io.ktor.server.routing.routing
@@ -68,12 +67,6 @@ fun main() {
scanner.start(applicationScope)
}
val webUiHtml = if (config.webUiEnabled) {
AppConfig::class.java.getResource("/web/index.html")?.readText()
} else {
null
}
val server = embeddedServer(Netty, port = config.port, host = "0.0.0.0") {
install(ContentNegotiation) {
json(
@@ -131,9 +124,11 @@ fun main() {
routing {
get("/health") { call.respondText("ok") }
if (webUiHtml != null) {
get("/") { call.respondRedirect("/ui") }
get("/ui") { call.respondText(webUiHtml, ContentType.Text.Html) }
get("/") {
call.respondText(
"AudioManager\nAPI: /api/v1\nHealth: /health\n",
ContentType.Text.Plain,
)
}
apiRoutes(
users = users,