1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use actix_web::{get, web::Json, Responder};
use serde::Serialize;

#[doc(hidden)]
#[derive(Serialize)]
struct Hello {
    autopulse: String,
}

#[get("/")]
pub async fn hello() -> impl Responder {
    let cargo_version = format!("v{}", env!("CARGO_PKG_VERSION"));

    Json(Hello {
        autopulse: cargo_version,
    })
}