shuttle-poem

Crates.ioshuttle-poem
lib.rsshuttle-poem
version0.48.0
sourcesrc
created_at2023-03-14 12:31:00.029851
updated_at2024-10-01 14:36:43.779008
descriptionService implementation to run a poem webserver on shuttle
homepage
repositoryhttps://github.com/shuttle-hq/shuttle
max_upload_size
id809814
size2,607
Release (github:shuttle-hq:release)

documentation

README

Shuttle service integration for the Poem web framework

Example

use poem::{get, handler, Route};
use shuttle_poem::ShuttlePoem;

#[handler]
fn hello_world() -> &'static str {
    "Hello, world!"
}

#[shuttle_runtime::main]
async fn poem() -> ShuttlePoem<impl poem::Endpoint> {
    let app = Route::new().at("/", get(hello_world));

    Ok(app.into())
}
Commit count: 1381

cargo fmt