start

abstract fun start(port: Int, wait: Boolean = false, onReady: (Stoppable) -> Unit = {})

Starts the server on port.

Parameters

port

port to start the server on

wait

if true, blocks the current thread until the server is stopped

onReady

callback called when the server is ready to accept requests, with the application as argument