yahf 0.0.2

Yet Another HTTP Framework focused on DX
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern crate yahf;

use yahf::server::Server;

#[tokio::main]
async fn main() {
    let server = Server::new().get(
        "/",
        || async { "Hello world".to_string() },
        &(),
        &String::with_capacity(0),
    );

    server
        .listen(([127, 0, 0, 1], 8000).into())
        .await
        .unwrap();
}