🏗️ Elegant & Highly Performant Async Gemini Server Framework for the Modern Age
async framework gemini-protocol protocol gemini rust
at main 24 lines 764 B view raw
1//! `cargo run --example binary --features response-macros` 2//! 3//! Optionally, you can run this example with the `auto-deduce-mime` feature 4//! enabled. 5 6#[windmark::main] 7async fn main() -> Result<(), Box<dyn std::error::Error>> { 8 let mut router = windmark::router::Router::new(); 9 10 router.set_private_key_file("windmark_private.pem"); 11 router.set_certificate_file("windmark_public.pem"); 12 #[cfg(feature = "auto-deduce-mime")] 13 router.mount("/automatic", { 14 windmark::binary_success!(include_bytes!("../LICENSE")) 15 }); 16 router.mount("/specific", { 17 windmark::binary_success!(include_bytes!("../LICENSE"), "text/plain") 18 }); 19 router.mount("/direct", { 20 windmark::binary_success!("This is a string.", "text/plain") 21 }); 22 23 router.run().await 24}