Files
sofa/app/api/health/route.ts
T
2026-03-02 14:59:52 -05:00

13 lines
324 B
TypeScript

import { NextResponse } from "next/server";
import { client } from "@/lib/db/client";
export async function GET() {
try {
await client.execute("SELECT 1");
return NextResponse.json({ status: "healthy" }, { status: 200 });
} catch {
return NextResponse.json({ status: "unhealthy" }, { status: 503 });
}
}