bae705aa97
- Add NFC ePassport roadmap (ICAO 9303, eIDAS) - Add TensorFlow.js edge face detection (BlazeFace) - Add structured audit logger (GDPR-compliant) - Risk scoring support Part of KYC Apple Native UX v1.1.0
15 lines
426 B
JavaScript
15 lines
426 B
JavaScript
/**
|
|
* routes/health.mjs — Health check endpoint
|
|
*/
|
|
|
|
export default function registerHealth(app, pool, PORT) {
|
|
app.get('/health', async (_req, res) => {
|
|
try {
|
|
await pool.query('SELECT 1');
|
|
res.json({ ok: true, service: 'aamos-ledger', port: PORT, db: 'connected' });
|
|
} catch (e) {
|
|
res.status(503).json({ ok: false, service: 'aamos-ledger', db: 'disconnected', error: e.message });
|
|
}
|
|
});
|
|
}
|