From 1a0f75d20bba0bde471595a3153a308f5f9253a6 Mon Sep 17 00:00:00 2001 From: Ajax Davis Date: Fri, 28 Nov 2025 05:45:17 +1000 Subject: [PATCH] feat(api): add health check endpoint for diagnostics --- apps/web/src/app/api/health/route.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 apps/web/src/app/api/health/route.ts diff --git a/apps/web/src/app/api/health/route.ts b/apps/web/src/app/api/health/route.ts new file mode 100644 index 0000000..4a25df5 --- /dev/null +++ b/apps/web/src/app/api/health/route.ts @@ -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, + }, + }); +}