Crates.io | shuttle-salvo |
lib.rs | shuttle-salvo |
version | 0.49.0 |
source | src |
created_at | 2023-03-14 12:40:17.602256 |
updated_at | 2024-11-12 14:57:33.379035 |
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())
}