From f144ba43b5a6b80f52c3170355a1306ce222dcf5 Mon Sep 17 00:00:00 2001 From: Syfaro Date: Tue, 27 Jul 2021 23:07:02 -0400 Subject: [PATCH] Add health endpoint. --- src/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.rs b/src/main.rs index a247756..2d2b84e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -152,6 +152,8 @@ async fn main() { app.with(middlewares::TidePrometheusMiddleware); app.at("/search").get(search); + app.at("/health").get(|_| async { Ok("OK") }); + app.listen(&http_listen) .await .expect_or_log("could not start web server");