From 73c0f00899788fce68908d81a1faadb2b47d2517 Mon Sep 17 00:00:00 2001 From: dawn <90008@gaze.systems> Date: Wed, 15 Apr 2026 23:18:46 +0300 Subject: [PATCH] [api] also add _health --- README.md | 2 +- src/api/mod.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b46b406..bb97f09 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ you should only expose the following paths: - `/xrpc/*`: XRPC endpoints. - `/stream`: hydrant's ordered event stream. - `/stats`: general database statistics. -- `/health`: simple health check. +- `/health` / `/_health`: health check. #### management endpoints (keep private) diff --git a/src/api/mod.rs b/src/api/mod.rs index 636f219..7ad95a5 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -24,6 +24,7 @@ pub async fn serve(hydrant: Hydrant, port: u16) -> miette::Result<()> { let mut app = Router::new() .route("/", get(async || include_str!("index.txt"))) .route("/health", get(async || "OK")) + .route("/_health", get(async || "OK")) .route("/stats", get(stats::get_stats)); #[cfg(feature = "indexer")] let app = app.nest("/stream", stream::router()); -- 2.51.2