use envkit::EnvLoader;

fn main() -> Result<(), envkit::error::EnvError> {
    let loader = EnvLoader;

    let port: u16 = loader.get("PORT")?;
    let debug: bool = loader.get_or("DEBUG", false);
    let app_name: String = loader.get_opt("APP_NAME").unwrap_or_else(|| "envkit".to_string());

    println!("port={port}");
    println!("debug={debug}");
    println!("app_name={app_name}");

    Ok(())
}
