ServerApplication
ServerApplication class provides quick extensions for configuring Ktor Server at startup.
Example usage:
class MyApplication : ServerApplication() {
override val configurers = listOf(Routing, Security)
override fun launch() {
val environment = createApplicationEngineEnvironment()
embeddedServer(Netty, environment).start(wait = true)
}
}
Content copied to clipboard
See also
Functions
Link copied to clipboard
fun Application.applyApplicationConfigurersAndRoutes(koinModule: Module = this@ServerApplication.koinModule, config: ApplicationConfig = environment.config)
Link copied to clipboard
fun ApplicationEngineEnvironmentBuilder.applyEnvironmentConfiguration(koinModule: Module = this@ServerApplication.koinModule, config: ApplicationConfig = this@ServerApplication.config)
Link copied to clipboard
fun createApplicationEngineEnvironment(koinModule: Module = this.koinModule, config: ApplicationConfig = this.config): ApplicationEngineEnvironment