Environments
Ktor doesn’t impose any way for doing this, but here are some guidelines you can use, in case you were wondering about it.
For example:
application.conf:
fun Application.module() {
when {
// Do things only in dev
}
isProd -> {
// Do things only in prod
}
// Do things for all the environments
}
val Application.envKind get() = environment.config.property("ktor.environment").getString()
val Application.isDev get() = envKind == "dev"