use axum::Router; use axum::routing::{get, post}; use std::sync::mpsc; mod healthcheck; mod shutdown; use healthcheck::healthcheck; use shutdown::shutdown; pub fn app() -> (Router, mpsc::Receiver) { let (tx, rx) = mpsc::channel(); ( Router::new() .route("/healthcheck", get(healthcheck)) .route("/shutdown", post(move || shutdown(tx.clone()))), rx, ) }