CHORE(app): initial configuration
- Add initial app settings - Configure base deployment
This commit is contained in:
25
services/nextjs/app/api/health/route.ts
Normal file
25
services/nextjs/app/api/health/route.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { NextResponse } from 'next/server'
|
||||
import { prisma } from '@/shared/lib/prisma'
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
// 데이터베이스 연결 확인
|
||||
await prisma.$queryRaw`SELECT 1`
|
||||
|
||||
return NextResponse.json({
|
||||
status: 'ok',
|
||||
timestamp: new Date().toISOString(),
|
||||
database: 'connected'
|
||||
})
|
||||
} catch {
|
||||
return NextResponse.json(
|
||||
{
|
||||
status: 'error',
|
||||
timestamp: new Date().toISOString(),
|
||||
error: 'Database connection failed'
|
||||
},
|
||||
{ status: 503 }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user