serve

fun serve(    adapter: HttpServerPort,     handlers: List<ServerHandler>,     settings: HttpServerSettings = HttpServerSettings()): HttpServer

Create a server and start it.

Return

The started HttpServer instance.

Parameters

adapter

Adapter instance which implements HttpServerPort.

handlers

List of handlers to be used by the server.

settings

Server settings info.


fun serve(    adapter: HttpServerPort,     handler: ServerHandler,     settings: HttpServerSettings = HttpServerSettings()): HttpServer

Create a server and start it.

Return

The started HttpServer instance.

Parameters

adapter

Adapter instance which implements HttpServerPort.

handler

Handler to be used by the server.

settings

Server settings info.


fun serve(    adapter: HttpServerPort,     settings: HttpServerSettings = HttpServerSettings(),     block: ServerBuilder.() -> Unit): HttpServer

Create a server and start it.

Return

The started HttpServer instance.

Parameters

adapter

Adapter instance which implements HttpServerPort.

settings

Server settings info.

block

Lambda to be used to create the server's handlers.