diff --git a/app/api/health/route.ts b/app/api/health/route.ts index f7d3295..3c9057f 100644 --- a/app/api/health/route.ts +++ b/app/api/health/route.ts @@ -1,5 +1,12 @@ import { NextResponse } from "next/server"; +import { client } from "@/lib/db/client"; -export function GET() { - return NextResponse.json({ status: "ok" }); +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 }); + } }