Crates.io | shuttle-salvo |
lib.rs | shuttle-salvo |
version | 0.48.0 |
source | src |
created_at | 2023-03-14 12:40:17.602256 |
updated_at | 2024-10-01 14:36:45.338207 |
description | Service implementation to run a salvo webserver on shuttle |
homepage | |
repository | https://github.com/shuttle-hq/shuttle |
max_upload_size | |
id | 809825 |
size | 2,678 |
use salvo::prelude::*;
#[handler]
async fn hello_world(res: &mut Response) {
res.render(Text::Plain("Hello, world!"));
}
#[shuttle_runtime::main]
async fn salvo() -> shuttle_salvo::ShuttleSalvo {
let router = Router::new().get(hello_world);
Ok(router.into())
}