Skip to content

Web framework for Navi

Simple. Fast. Refined.

nv
use sake.{Engine, func_handler};

fn main() throws {
    let app = Engine.with_defaults();

    app.get("/", func_handler(|ctx| {
        ctx.string("Hello, Sake.");
    }));

    app.get("/api/users/:id", func_handler(|ctx| {
        let id = ctx.param("id");
        try? ctx.json({"id": id});
    }));

    try app.run(":8080");
}
45,000+ req/sec

Released under the MIT License. Built for Navi.