micron 0.1.0

Build web apps fast. Repeat.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Shows how one can load configuration from file.

use micron::{axum::Router, config, Config};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    // Load configuration from file
    let config: Config = config::load_from(&format!(
        "{}/../examples/saas/micron.toml",
        env!("CARGO_MANIFEST_DIR")
    ))?;

    // Start the application
    micron::axum::start(Router::new(), config).await?;

    Ok(())
}