mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 03:55:38 -04:00
13 lines
324 B
TypeScript
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 });
|
|
}
|
|
}
|