Crates.io | shuttle-poem |
lib.rs | shuttle-poem |
version | 0.48.0 |
source | src |
created_at | 2023-03-14 12:31:00.029851 |
updated_at | 2024-10-01 14:36:43.779008 |
description | Service implementation to run a poem webserver on shuttle |
homepage | |
repository | https://github.com/shuttle-hq/shuttle |
max_upload_size | |
id | 809814 |
size | 2,607 |
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())
}