serverkit-hyper 0.4.0

Hyper HTTP/1 and HTTP/2 adapter for ServerKit
Documentation
1
2
3
4
5
6
7
8
9
10
11
use serverkit_hyper::*;

async fn health() -> &'static str {
    "ok"
}

fn main() -> std::io::Result<()> {
    let listener = std::net::TcpListener::bind("127.0.0.1:3000")?;

    Router::new(Config::new(), ("/health".GET(health),)).run(listener)
}