Skip to content

Configuration

health()

health() — returns struct

Available in: mapper Category: Routing

Register a health check route at /health (or a custom path). Returns a JSON response with status and timestamp by default, or delegates to a custom controller action. This is useful for container orchestration (Kubernetes liveness/readiness probes), load balancer health checks, and monitoring tools.

NameTypeRequiredDefaultDescription
tostringnowheels#healthSet controller##action combination for a custom health check handler. If not provided, a default handler returns {"status":"ok","timestamp":"..."}.
pathstringnohealthOverride the URL path. Defaults to "health".
namestringnohealthOverride the route name. Defaults to "health".