// main.rs — TezWeb hello world use tezweb::{TezWeb, Response}; #[tokio::main] async fn main() { TezWeb::new() .port(8080) .get("/hello", |_req, _params| async move { Response::ok().text("Hello from TezWeb! ⚡") }) .run() .await .unwrap(); }
More examples: cargo run --example rest_api · cargo run --example websocket_chat
or add to Cargo.toml:
tezweb = { git = "https://github.com/akramjhabail/tezweb" }
TezWeb is free and open source. Your donation keeps it alive.