Appearance
Health & monitoring
FlowRunner exposes one endpoint for liveness and readiness — GET /api/health. Point your load balancer and uptime monitor at it to know, at a glance, whether the app is up and reaching its database.
The endpoint
GET /api/health is unauthenticated but leaks nothing sensitive — it reports only ok/error and which optional features are configured, never any secret values. It responds to a plain GET:
bash
curl -isS https://<your-host>/api/healthStatus codes
The status code is what your monitor should react to:
| Code | Meaning | React by |
|---|---|---|
200 | The database responded to a ping — the app is healthy. | Nothing; all good. |
503 | The database is unreachable (ping failed or the connection threw). | Alerting; check MONGODB_URI, network, and the Mongo host. |
Because a database outage flips the code to 503, an orchestrator (Kubernetes, a load balancer, Vercel's health checks) can pull the instance out of rotation automatically.
What the checks report
The response body carries a small checks object built by checkHealth:
json
{
"ok": true,
"checks": {
"db": "ok",
"secretsVault": "configured",
"scheduler": "configured"
}
}| Field | Values | What it means |
|---|---|---|
db | ok / error | Result of a live ping against MongoDB. This alone drives ok and the status code. |
secretsVault | configured / disabled | Whether SECRETS_KEY is set — reported by presence only, the value is never exposed. |
scheduler | configured / disabled | Whether CRON_SECRET is set — again, presence only. |
NOTE
Only the database check affects ok and the HTTP status. secretsVault and scheduler are informational — a deploy with both features off is still perfectly healthy and returns 200. Use those two fields as a quick configuration audit, not as an alerting signal.
Monitoring in practice
- Uptime monitor — poll
/api/healthon your usual interval and alert on any non-200. - Load balancer / orchestrator — use it as the readiness probe so unhealthy instances leave rotation.
- Post-deploy smoke check — the first thing to curl after a release. If
dbiserror, the app started but can't reach Mongo; if a feature readsdisabledunexpectedly, its environment variable didn't reach the runtime. See Environment variables.
INFO
📸 Screenshot — an uptime monitor configured with /api/health as the check URL, showing a green/200 status