🏗️ Elegant & Highly Performant Async Gemini Server Framework for the Modern Age
async framework gemini-protocol protocol gemini rust
at main 16 lines 555 B view raw
1//! `cargo run --example partial` 2 3#[windmark::main] 4async fn main() -> Result<(), Box<dyn std::error::Error>> { 5 windmark::router::Router::new() 6 .set_private_key_file("windmark_private.pem") 7 .set_certificate_file("windmark_public.pem") 8 .add_header(|_| "This is fancy art.\n".to_string()) 9 .add_footer(|context: windmark::context::RouteContext| { 10 format!("\nYou came from '{}'.", context.url.path()) 11 }) 12 .add_footer(|_| "\nCopyright (C) 2022".to_string()) 13 .mount("/", windmark::success!("Hello!")) 14 .run() 15 .await 16}