Keiro is a lightweight router for Rust HTTP services. It is based on hyper.
```rust use std::error::Error; use std::net::SocketAddr;
use hyper::{Body, Request, Response, Server}; use keiro::{Params, Router};
async fn main() { let mut router = Router::new(); router.get("/", index); router.get("/hello/:user1/from/:user2", hello); router.get("/hi/*path", hi); let addr = SocketAddr::from(([0, 0, 0, 0], 8080));
Server::bind(&addr)
.serve(router.into_service())
.await
.unwrap();
}
async fn index(_req: Request
) -> Resultasync fn hello(req: Request
) -> Resultasync fn hi(req: Request
) -> Resultcargo test
command and confirm that it passescargo fmt
and pass cargo clippy