Tobias
11/13/2023, 9:03 AMrouting {
get("/") {
call.respondText("Hi") // works
val bytes = resource("index.html").readBytes() // resources method not found
call.respondText(contentType = ContentType.Text.Html, text = bytes.decodeToString())
}
// staticResources not found
staticResources("/", "static") {
default("index.html")
preCompressed(CompressedFileType.GZIP)
}
}
Is this a limitation of Kotlin native or did I miss something else?Aleksei Tirman [JB]
11/14/2023, 8:21 AMTobias
11/14/2023, 8:25 AMAleksei Tirman [JB]
11/14/2023, 8:32 AMTobias
11/14/2023, 8:33 AM