mz_environmentd/http/
root.rs1use askama::Template;
13use axum::response::IntoResponse;
14
15use crate::BUILD_INFO;
16
17#[derive(Template)]
18#[template(path = "home.html")]
19struct HomeTemplate<'a> {
20 version: &'a str,
21 build_sha: &'static str,
22 profiling: bool,
23}
24
25pub async fn handle_home(profiling: bool) -> impl IntoResponse {
26 mz_http_util::template_response(HomeTemplate {
27 version: BUILD_INFO.version,
28 build_sha: BUILD_INFO.sha,
29 profiling,
30 })
31}
32
33mz_http_util::make_handle_static!(
34 dir_1: ::include_dir::include_dir!("$CARGO_MANIFEST_DIR/src/http/static"),
35 dir_2: ::include_dir::include_dir!("$OUT_DIR/src/http/static"),
36 prod_base_path: "src/http/static",
37 dev_base_path: "src/http/static-dev",
38);