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")?) }