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);
}
- Safe and ergonomic API
- Built on top of the powerful Hyper library
- Extensible and flexible