ktor-server-host-common / io.ktor.server.engine / kotlinx.coroutines.CoroutineScope / embeddedServer

embeddedServer

fun <TEngine : ApplicationEngine, TConfiguration : Configuration> CoroutineScope.embeddedServer(factory: ApplicationEngineFactory<TEngine, TConfiguration>, port: Int = 80, host: String = "0.0.0.0", watchPaths: List<String> = listOf(WORKING_DIRECTORY_PATH), parentCoroutineContext: <ERROR CLASS> = EmptyCoroutineContext, 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

parentCoroutineContext - specifies a coroutine context to be used for server jobs

module - application module function