aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
blob: e9c50e4efb505ed99e011a0fa3c19755b4abd669 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[macro_use]
extern crate rouille;


fn main() {
    rouille::start_server("localhost:8000", move |request| {
        router!(request,
            (GET) (/) => {
                rouille::Response::text("hello world")
            },

            _ => rouille::Response::text("404 Not Found")
                    .with_status_code(404)
        )
    });
}