diff --git a/fly.toml b/fly.toml index fee7809..f84f043 100644 --- a/fly.toml +++ b/fly.toml @@ -25,7 +25,7 @@ interval = '30s' timeout = '5s' grace_period = '10s' method = 'GET' -path = '/' +path = '/health' [mounts] source = 'brewlog_data' diff --git a/src/application/routes/app/mod.rs b/src/application/routes/app/mod.rs index 5b4348f..344934b 100644 --- a/src/application/routes/app/mod.rs +++ b/src/application/routes/app/mod.rs @@ -39,6 +39,7 @@ pub(super) fn router() -> axum::Router { .route("/components/donut-chart.js", get(donut_chart_js)) .route("/favicon-light.svg", get(favicon_light)) .route("/favicon-dark.svg", get(favicon_dark)) + .route("/health", get(health)) } async fn scan_redirect() -> Redirect { @@ -134,3 +135,10 @@ async fn favicon_dark() -> impl IntoResponse { include_str!("../../../../static/favicon-dark.svg"), ) } + +async fn health() -> impl IntoResponse { + ( + [("content-type", "application/json")], + r#"{"status":"ok"}"#, + ) +}