puff-rs 0.1.2

Puff - Deep Stack Python Runtime and GraphQL library.
Documentation
use puff_rs::graphql::handlers::{handle_graphql, handle_subscriptions, playground};

use puff_rs::program::commands::http::ServerCommand;
use puff_rs::program::Program;
use puff_rs::runtime::RuntimeConfig;

use puff_rs::web::server::Router;
use std::process::ExitCode;

fn main() -> ExitCode {
    let config = RuntimeConfig::default()
        .set_postgres(true)
        .set_gql_schema_class("graphql_python.schema")
        .add_python_path("examples/");

    let router = Router::new()
        .get("/", playground("/graphql", "/subscriptions"))
        .post("/graphql", handle_graphql())
        .get("/subscriptions", handle_subscriptions());

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