serverkit-hyper 0.1.0

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

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

fn main() -> std::io::Result<()> {
    Router::new(Config::new(), ("/health".GET(health),)).run(Http::bind("127.0.0.1:3000")?)
}