Files
adam-acs/app/controllers/health_controller.ts
T
Kevin L'HereecandCopilot d1c65dbf1e chore: initial commit — AdonisJS v7 TR-069 ACS
- Docker infrastructure (Dockerfile, docker-compose.yml, genieacs-sim)
- AdonisJS v7 app with Inertia.js + Vue 3
- MongoDB integration
- CWMP/TR-069 state machine engine
- Configuration engine with compliance tracking
- Branding: ADAM ACS (favicon, navbar, locales)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-29 16:46:37 +02:00

19 lines
538 B
TypeScript

import type { HttpContext } from '@adonisjs/core/http'
import { getMongoDb } from '#providers/mongodb_provider'
export default class HealthController {
async checklife({ response }: HttpContext) {
return response.json({ status: 'OK' })
}
async checkservice({ response }: HttpContext) {
try {
const db = getMongoDb()
await db.command({ ping: 1 })
return response.json({ status: 'OK', version: '1.0.0' })
} catch {
return response.status(503).json({ status: 'KO', version: '1.0.0' })
}
}
}