puff-rs 0.1.2

Puff - Deep Stack Python Runtime and GraphQL library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use puff_rs::prelude::*;
use puff_rs::program::commands::ServerCommand;

fn main() -> ExitCode {
    let app = Router::new().get("/", root);

    Program::new("my_first_app")
        .about("This is my first app")
        .command(ServerCommand::new(app))
        .run()
}

// Basic handler that responds with a static string
async fn root() -> Text {
    "Ok".to_text()
}