Crates.io | shuttle-poem |
lib.rs | shuttle-poem |
version | 0.49.0 |
source | src |
created_at | 2023-03-14 12:31:00.029851 |
updated_at | 2024-11-12 14:57:55.215798 |
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())
}