shuttle-thruster

Crates.ioshuttle-thruster
lib.rsshuttle-thruster
version0.43.0
sourcesrc
created_at2023-03-14 12:32:21.343913
updated_at2024-04-02 12:27:41.317258
descriptionService implementation to run a thruster webserver on shuttle
homepage
repository
max_upload_size
id809816
Jocelyn Boullier (Kazy)

documentation

README

## Shuttle service integration for the Thruster web framework ### Example ```rust,no_run use thruster::{ context::basic_hyper_context::{generate_context, BasicHyperContext as Ctx, HyperRequest}, m, middleware_fn, App, HyperServer, MiddlewareNext, MiddlewareResult, ThrusterServer, }; #[middleware_fn] async fn hello(mut context: Ctx, _next: MiddlewareNext) -> MiddlewareResult { context.body("Hello, World!"); Ok(context) } #[shuttle_runtime::main] async fn thruster() -> shuttle_thruster::ShuttleThruster> { let server = HyperServer::new( App::::create(generate_context, ()).get("/", m![hello]), ); Ok(server.into()) } ```
Commit count: 0

cargo fmt