Fixes · Deploys that break
Find out your app is down before your customers do: a health check URL
A health URL lets an uptime monitor test your app and its database every few minutes, so an outage reaches you in minutes instead of through an angry email.
What you see
The first you hear of an outage is a customer telling you, or a dashboard that loads while every page that needs the database fails.
Why it happens
A home page can load from a cache while the database, sign-in or payments behind it are broken. Monitors that only fetch the home page miss that, and without a monitor nothing is watching at all.
How to fix it
- Add a route such as
/api/healththat runs one cheap database query and returns 200 with{"ok":true}, or 503 when the query fails. - Keep it fast and free of secrets: no user data, no stack traces.
- Point an uptime monitor at it, checking every few minutes and alerting you by email, Slack or Discord.
Or ask your AI tool to fix it
Paste this into Lovable, Bolt, v0, Replit or Cursor, and let it make the change.
Add a GET /api/health route that runs a single lightweight database query and returns 200 with {"ok":true} when it succeeds and 503 when it fails, without revealing any data, secrets or error details.
Don't change what the app does.
Never put a secret key or password in the code: read it from an environment variable.
If a step has to be done outside the code, like revoking a key in a provider's dashboard, list it for me at the end instead of skipping it.How Launchpad helps
Every Launchpad plan checks each live app every 5 minutes, alerts you by email, Slack or Discord, and can publish a status page. Its starter templates come with /api/health.
Check your app for this, freeStart free