https://kotlinlang.org logo
#ktor
Title
# ktor
a

Alex Styl

11/30/2021, 6:06 PM
How can I check in runtime if I am running in a development environment?
a

Aleksei Tirman [JB]

11/30/2021, 6:58 PM
Copy code
embeddedServer(CIO, port = 3333) {
    val app = this
    routing {
        get("/") {
            call.respondText { app.environment.developmentMode.toString() }
        }
    }
}.start(wait = true)
💯 1
22 Views