Skip to main content

bind_and_serve

Function bind_and_serve 

Source
pub async fn bind_and_serve(bind_addr: &str, app: Router) -> Result<()>
Expand description

Bind a TCP listener on bind_addr and serve a pre-built axum::Router.

Used by crate::run (after embedded::build returns the composed router) and by downstream embedders who want to add their own middleware / merge with their own router before serving.