- Safe and ergonomic API
- Async by default with Hyper integration
- Middleware and router support
- Extensible design
use gotham::state::State;
use gotham::router::builder::*;
fn hello_handler(state: State) -> (State, &'static str) {
(state, "Hello, Gotham!")
}
fn main() {
let router = build_simple_router(|route| {
route.get("/").to(hello_handler);
});
gotham::start("127.0.0.1:7878", router);
}