Web Module
Functions and values
| Function or value | Description |
|
|
Full Usage:
defaultErrorHandler ex msg ctx
Parameters:
Exception
msg : 'a
ctx : HttpContext
Returns: Async<HttpContext option>
|
|
|
|
Full Usage:
startWebServerAsync config webpart
Parameters:
SuaveConfig
webpart : WebPart
Returns: Async<StartedData option array> * Task
|
Starts the web server asynchronously. Returns the webserver as a tuple of 1) an async computation that yields startup metrics DTOs when the web server is ready to serve requests, and 2) an async computation that yields when the web server is being shut down and is being terminated. The async values returned are not 'hot' in the sense that they have started running, so you must manually start the 'server' (second item in tuple), as this starts the TcpListener. Have a look at the example and the unit tests for more documentation. In other words: don't block on 'listening' unless you have started the server. The return value from 'listening' (first item in tuple) gives you some metrics on how quickly suave started.
|