Skip to main content

parse_rust_server/routes/
health.rs

1//! `GET /health`. Credential-free upstream, and the endpoint every bring-up script polls.
2//!
3//! It reports liveness only, and that is a known gap rather than a pending one: storage has
4//! landed, so this must learn to distinguish "process up" from "database reachable". A health
5//! endpoint that returns ok before its dependencies are connected turns every startup race into a
6//! mystery test failure, because the harness stops polling exactly when the server is least ready.
7//!
8//! Until it does, the one property it has to keep is that it answers **without** resolving a
9//! request context. A health check that loaded schemas would fail exactly when a caller most
10//! wants to tell "process up, database down" from "process down".
11
12use serde_json::{json, Value as Json};
13
14pub fn body() -> Json {
15    json!({ "status": "ok" })
16}