Http module

serve

procedure · 1 overloadSource

Runs the app until it is stopped: SIGINT or SIGTERM (when config.handle_signals), or shutdown(*app) from another thread. One scheduler per config.threads (default: the processor count), each with its own listener on the same port. Returns once the servers have stopped; the error says why it could not start (the port is taken, two routes conflict, the TLS configuration is unusable) and is .NONE for a clean stop.

serve :: (app: *App) -> Serve_Error

Runs the app until it is stopped: SIGINT or SIGTERM (when config.handle_signals), or shutdown(*app) from another thread. One scheduler per config.threads (default: the processor count), each with its own listener on the same port. Returns once the servers have stopped; the error says why it could not start (the port is taken, two routes conflict, the TLS configuration is unusable) and is .NONE for a clean stop.

Parameters

app: *App

Returns

See also