feat: backend MVP (auth/rbac, catalog, orders, fulfillment, invoices) + specs + scaffolds
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
pub mod auth;
|
||||
pub mod cart;
|
||||
pub mod config;
|
||||
pub mod error;
|
||||
pub mod models;
|
||||
pub mod money;
|
||||
pub mod pagination;
|
||||
pub mod routes;
|
||||
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(routes::health::health))
|
||||
.nest("/api", routes::api_router(state.clone()))
|
||||
.layer(TraceLayer::new_for_http())
|
||||
.layer(CorsLayer::permissive())
|
||||
.with_state(state)
|
||||
}
|
||||
Reference in New Issue
Block a user