use anyhow::Result;
use warthunder_confidential_document_leak_counter::{run, Config};

#[tokio::main]
async fn main() -> Result<()> {
    let config = Config {
        port: std::env::var("WARTHUNDER_LEAK_SERVE_PORT")
            .ok()
            .and_then(|p| p.parse().ok())
            .unwrap_or(8000u16),
    };

    run(config).await?.server.await?;

    Ok(())
}
