Health Endpoint Generator — /health Snippets
Quick answer
Pick your stack and get a minimal health check route that returns HTTP 200 and a small JSON body—ready to paste into your repo. Then point StillOnline uptime monitoring at the public URL.
Generator
// app/api/health/route.ts
import { NextResponse } from "next/server";
export async function GET() {
return NextResponse.json({ status: "ok" }, { status: 200 });
}After deploy, point https://your-domain.com/health in StillOnline.
How it works
Each template returns {"status":"ok"} (or equivalent) on GET. Liveness vs readiness nuances are noted in comments. After deploy, add the URL in StillOnline—Free tier allows one URL every 5 minutes.
See also: health check URL design.
FAQ
Will StillOnline call POST endpoints?
Default checks use GET. If you need POST, configure method in the dashboard when creating a check.
Do I need authentication on /health?
Prefer a public liveness URL without secrets for external probes. Keep detailed diagnostics on a private route.
What about Kubernetes?
K8s uses the same patterns—this generator helps indie SaaS on Vercel, Railway, or a single VPS.
Need 24/7 monitoring?
Free: 1 URL, checks every 5 minutes, hosted status page.
Start free