Initial commit

This commit is contained in:
kikootwo
2026-01-28 11:41:24 -05:00
commit a3ba192fbd
257 changed files with 89482 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
/**
* Component: Health Check API Route
* Documentation: documentation/deployment/docker.md
*/
import { NextResponse } from 'next/server';
import { prisma } from '@/lib/db';
export async function GET() {
try {
// Check database connectivity
await prisma.$queryRaw`SELECT 1`;
return NextResponse.json({
status: 'healthy',
timestamp: new Date().toISOString(),
database: 'connected',
});
} catch (error) {
console.error('Health check failed:', error);
return NextResponse.json(
{
status: 'unhealthy',
timestamp: new Date().toISOString(),
database: 'disconnected',
error: error instanceof Error ? error.message : 'Unknown error',
},
{ status: 503 }
);
}
}