Crate grenade

Source
Expand description

§Grenade Documentation

Welcome to the documentation of Grenade!

§Usage

Start by adding the Grenade library to your project’s Cargo.toml file:

[dependencies]
grenade = "0.1"

And here is an example of hello world application in Grenade:

use grenade::*;

fn hello_world(_: Context) -> String {
    "Hello World!".to_string()
}

fn main() {
    let mut app = App::build();

    app.get("/", hello_world);

    app.listen(8080).unwrap();
}

Structs§

App
App structure for making a new web application
Context
Router
A Router that used to store a collection of routes and then it can be bind to the main routes in some app