attemptStartUntilPortAvailable

fun attemptStartUntilPortAvailable(startingPort: Int, onReady: (Stoppable, port: Int) -> Unit)

Attempts to start the server on a free port.

Parameters

startingPort

port to start from

onReady

callback called when the server is ready to accept requests, with the application and port as arguments