athene 2.0.4

A simple and lightweight rust web framework based on hyper
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use athene::prelude::*;

async fn send_file(req: Request) -> impl Responder {
    let res = Builder::new();
    res.send_file("Cargo.toml", req).await
}

#[tokio::main]
async fn main() -> Result<()> {
    let app = athene::new();
    let app = app.router(|r|r.get("/send_file", send_file));
    app.listen("127.0.0.1:7878").await
}