serve
fun serve(adapter: HttpServerPort, handler: HttpHandler, 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: HandlerBuilder.() -> 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.