Skip to main content

build_router

Function build_router 

Source
pub fn build_router(state: AppState) -> Router
Expand description

Build the application.

/health is registered on the outer router, outside TraceLayer, because Router::layer only wraps routes registered before it. Health checks therefore produce no log lines at any RUST_LOG level, which keeps a container’s logs about requests that mean something.