From 4f3e5bc088b820aa760d6d5a7c95b64eafc24ed0 Mon Sep 17 00:00:00 2001 From: sksat Date: Wed, 30 Oct 2024 19:19:45 +0900 Subject: [PATCH] add healthcheck endpoint --- src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.rs b/src/main.rs index 154156c..5d5ce4a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -199,6 +199,7 @@ async fn main() -> std::io::Result<()> { .app_data(web::Data::new(Arc::new(cfg.clone()))) // memo: https://github.com/actix/actix-web/issues/1454#issuecomment-867897725 .app_data(web::Data::new(Arc::new(opt.clone()))) .service(web::resource("/webhook").route(web::post().to(webhook))) + .service(web::resource("/healthcheck").route(web::get().to(|| HttpResponse::Ok()))) }) .bind(format!("0.0.0.0:{}", port))? .run()