miko 0.9.0

A web framework for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use miko::{macros::*, *};

#[middleware]
async fn logg(a: i32, #[config("value.haha.heihei")] b: String) -> Result<Resp, AppError> {
    println!("logg active, {}, {}", a, b);
    _next.run(_req).await
}

#[get("/")]
#[layer(logg(88))]
async fn hello() -> &'static str {
    "Hello, world!"
}

#[miko]
async fn main() {}