Skip to main content

serve

Function serve 

Source
pub async fn serve(router: Router, host: &str, port: u16) -> Result<()>
Expand description

Binds to host:port and serves router until Ctrl+C or SIGTERM is received.

In-flight requests are allowed to finish before this function returns.