1
2
3
4
5
6
7
8
9
10
11
12
use anyhow::Result;
use salvo::prelude::*;

pub fn routes() -> Router {
    Router::new().push(Router::with_path("/healthcheck").get(get_healthcheck))
}

#[handler]
fn get_healthcheck(res: &mut Response) -> Result<()> {
    res.render(Text::Plain("OK"));
    Ok(())
}