puerto 0.19.0

Puerto — Rust full-stack DDD framework CLI. Scaffolds Clean Architecture projects with auto-wired DI, SQLx support, and zero manual wiring. Formerly puerto-framework.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
mod api;
mod app;
mod generated;

/// The configuration (environment and `.env`) and the server — tracing, health probes, CORS,
/// graceful shutdown — come from the Puerto runtime, `puerto-web`. The routes and the wiring are
/// in `generated/bootstrap.rs`; your own middleware and routes go in `app.rs`.
#[tokio::main]
async fn main() -> Result<(), puerto_web::Error> {
    let config = puerto_web::Config::from_env()?;
    puerto_web::App::new(config)
        .try_serve(generated::bootstrap::build_app)
        .await
}