Crate shuttle_poem

Crate shuttle_poem 

Source
Expand description

§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())
}

Re-exports§

pub use poem;

Structs§

PoemService
A wrapper type for poem::Endpoint so we can implement shuttle_runtime::Service for it.

Type Aliases§

ShuttlePoem
Shuttle service integration for the Poem web framework