pub mod auth; pub mod config; pub mod error; pub mod http; pub mod models; pub mod money; pub mod modules; pub mod seed; pub mod state; use axum::{routing::get, Router}; use tower_http::{cors::CorsLayer, trace::TraceLayer}; use crate::state::AppState; pub fn build_router(state: AppState) -> Router { Router::new() .route("/api/health", get(modules::health::health)) .nest("/api", modules::api_router()) .layer(TraceLayer::new_for_http()) .layer(CorsLayer::permissive()) .with_state(state) }