vial 0.0.5

a micro micro-framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use vial::prelude::*;

routes! {
    GET "/hi/world" => |_| "Hello, world!";
    GET "/hey/:place" => |req|
        format!("Heyo, {}!", req.arg("place").unwrap_or("?"));

    GET "/" => welcome;
}

fn welcome(_req: Request) -> impl Responder {
    Response::from_file("examples/welcome.html")
}

fn main() {
    vial::run!().unwrap();
}