1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! `rustango::server` — Django-style runserver builder.
//!
//! Owns every line of boilerplate that's identical across tenancy
//! apps: connect to `DATABASE_URL`, build `TenantPools`, mount the
//! resolver chain, host-dispatch apex → operator console / subdomain
//! → tenant admin + user routes, bind + serve.
//!
//! ```ignore
//! use rustango::server::Builder;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! tracing_subscriber::fmt().init();
//! Builder::from_env().await?
//! .admin_show_only(["author", "post"])
//! .api(my_app::urls::api())
//! .seed_with(|pools, registry, registry_url| async move {
//! my_app::seed::run(&pools, ®istry, ®istry_url).await
//! })
//! .await?
//! .serve("0.0.0.0:8080").await
//! }
//! ```
// v0.38 — `server::Builder` is the multi-tenant Postgres runserver
// (`TenantPools`, schema-mode dispatch, operator console). The Pool
// enum lift lands in slice 5; for now sqlite/mysql apps mount their
// own routes against `DatabasePools<DB>` + plain `axum::serve`.
pub use AppBuilder;
pub use ;