mirror of
https://github.com/spliit-app/spliit.git
synced 2026-03-05 20:26:11 +01:00
* Add health check API endpoint with database connectivity * Update locale handling to fallback to default language on invalid input * Add health check endpoints for application readiness and liveness - Introduced `/api/health/readiness` endpoint to check if the application can serve requests, including database connectivity. - Introduced `/api/health/liveness` endpoint to verify if the application is running independently of external dependencies. - Updated the health check logic to streamline database connectivity checks and response handling. * Refactor health check logic --------- Co-authored-by: Julen Dixneuf <julen.d@padoa-group.com>
8 lines
222 B
TypeScript
8 lines
222 B
TypeScript
import { checkLiveness } from '@/lib/health'
|
|
|
|
// Liveness: Is the app itself healthy? (no external dependencies)
|
|
// If this fails, Kubernetes should restart the pod
|
|
export async function GET() {
|
|
return checkLiveness()
|
|
}
|