Tim Malseed
04/25/2021, 4:31 AMfun Application.configureRouting() {
// Starting point for a Ktor app:
routing {
get("/") {
call.respondText("Hello World!")
}
There's no 'class' to hold an @Inject lateinit var
configureRouting()
function, but that's called from:
fun main() {
embeddedServer(Netty, port = 8080, host = "0.0.0.0", watchPaths = listOf("classes")) {
configureRouting()
}.start(wait = true)
}
Joost Klitsie
04/25/2021, 8:43 AMTim Malseed
04/25/2021, 12:23 PMcarrot
04/25/2021, 12:29 PM@Inject
The code samples aren't complete but hopefully it helps a little https://gist.github.com/CarrotCodes/f8d88b54a4cbbc60a411835775cbd60eTim Malseed
04/25/2021, 12:38 PM