Jgafner
08/01/2021, 3:45 PMAleksei Tirman [JB]
08/01/2021, 3:56 PMIs it possible to let ktor decide which modules to load based on development mode ?No. The best thing you can do is to wrap a module's code with a check for the
developmentMode
or custom property condition. Here is an example:
embeddedServer(Netty, applicationEngineEnvironment {
connector {
port = 7070
}
module {
if (developmentMode) {
routing {
get("/") {
call.respondText { "You will see it in the development mode" }
}
}
}
}
}).start()
Jgafner
08/01/2021, 4:01 PMAleksei Tirman [JB]
08/01/2021, 4:03 PM-config
CLI argument to specify the path to a HOCON file.Jgafner
08/01/2021, 4:04 PMAleksei Tirman [JB]
08/01/2021, 4:04 PMor maybe some feature like spring config profiles?I don't know about such a feature.