embeddedServer
fun <TEngine : ApplicationEngine, TConfiguration : Configuration> embeddedServer(
factory: ApplicationEngineFactory<TEngine, TConfiguration>,
port: Int = 80,
host: String = "0.0.0.0",
watchPaths: List<String> = listOf(WORKING_DIRECTORY_PATH),
configure: TConfiguration.() -> Unit = {},
module: Application.() -> Unit
): TEngine
Creates an embedded server with the given factory, listening on host:port
Parameters
watchPaths
- specifies path substrings that will be watched for automatic reloading
configure
- configuration script for the engine
module
- application module function
fun <TEngine : ApplicationEngine, TConfiguration : Configuration> embeddedServer(
factory: ApplicationEngineFactory<TEngine, TConfiguration>,
environment: ApplicationEngineEnvironment,
configure: TConfiguration.() -> Unit = {}
): TEngine
Creates an embedded server with the given factory, environment and configure script