feat(api): add health check endpoint for diagnostics

This commit is contained in:
Ajax Davis 2025-11-28 05:45:17 +10:00
parent c13ff2287b
commit 1a0f75d20b

View file

@ -0,0 +1,19 @@
import { NextResponse } from 'next/server';
export const runtime = 'nodejs';
export const dynamic = 'force-dynamic';
/**
* GET /api/health
* Simple health check endpoint that doesn't touch the database
*/
export async function GET() {
return NextResponse.json({
status: 'ok',
timestamp: new Date().toISOString(),
env: {
hasDatabase: !!process.env.DATABASE_URL,
nodeEnv: process.env.NODE_ENV,
},
});
}