aboutsummaryrefslogtreecommitdiffstats
path: root/src/web.rs
blob: 79ea75f9d974e909b97abba5d49fd8f22e63efeb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
use gotham::router::builder::{DefineSingleRoute as _, DrawRoutes as _};

pub fn router() -> gotham::router::Router {
    gotham::router::builder::build_simple_router(|route| {
        route.get("/").to(root);
    })
}

fn root(state: gotham::state::State) -> (gotham::state::State, String) {
    (state, "hello world".to_string())
}