Koven Server
object KovenServer
Singleton Koven server instance.
Usage example:
KovenServer.start {
config.port = 8081
PingContract.handle { _, _, _ -> "Pong" }
}.block()Content copied to clipboard
Properties
Functions
Link copied to clipboard
Blocks the current thread until the server is stopped.
Link copied to clipboard
Saves an asset to the KovenServerConfig.assetsPath directory.
Link copied to clipboard
Saves a file to the KovenServerConfig.filesPath directory.
Link copied to clipboard
fun start(server: (Int) -> ServerConfig = { JettyLoom(it) }, httpConfig: RoutingHttpHandler.() -> RoutingHttpHandler = { debug() }, serverConfig: KovenServerBuilder.() -> Unit = {}): KovenServer
Configures and starts the server.
Link copied to clipboard
Stops the server.