🏗️ Elegant & Highly Performant Async Gemini Server Framework for the Modern Age
async framework gemini-protocol protocol gemini rust
at main 19 lines 511 B view raw
1//! `cargo run --example stateless_module` 2 3use windmark::{response::Response, router::Router}; 4 5fn smiley(_context: windmark::context::RouteContext) -> Response { 6 Response::success("😀") 7} 8 9fn emojis(router: &mut Router) { router.mount("/smiley", smiley); } 10 11#[windmark::main] 12async fn main() -> Result<(), Box<dyn std::error::Error>> { 13 Router::new() 14 .set_private_key_file("windmark_private.pem") 15 .set_certificate_file("windmark_public.pem") 16 .attach_stateless(emojis) 17 .run() 18 .await 19}