- 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>
19 lines
538 B
TypeScript
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' })
|
|
}
|
|
}
|
|
}
|