Skip to main content

Module router

Module router 

Source
Expand description

Axum router construction.

Extracted from main.rs so integration tests can build the same router the binary uses without duplicating route definitions. The router is pure data — no I/O happens here; AppState carries the configuration and all I/O is deferred into the handler layer.

build_router accepts a pre-parsed list of allowed CORS origins. Parsing, validation, and the wildcard * check happen in main.rs, keeping this module free of clap and environment-variable concerns.

Functions§

build_router
Build the application router with all endpoints wired up.