UNPKG

adpa-enterprise-framework-automation

Version:

Modular, standards-compliant Node.js/TypeScript automation framework for enterprise requirements, project, and data management. Provides CLI and API for BABOK v3, PMBOK 7th Edition, and DMBOK 2.0 (in progress). Production-ready Express.js API with TypeSpe

52 lines 1.64 kB
export class HealthController { static getHealth(req, res) { res.status(200).json({ status: 'ok', message: 'Service is healthy', timestamp: new Date().toISOString() }); } static getReadiness(req, res) { res.status(200).json({ status: 'ready', message: 'Service is ready', timestamp: new Date().toISOString() }); } static getLiveness(req, res) { res.status(200).json({ status: 'live', message: 'Service is live', timestamp: new Date().toISOString() }); } static getMetrics(req, res) { // Example metrics, replace with real metrics as needed res.status(200).json({ uptime: process.uptime(), memoryUsage: process.memoryUsage(), timestamp: new Date().toISOString() }); } static getVersion(req, res) { // Read version from package.json try { const packageJson = require('../../../package.json'); res.status(200).json({ version: packageJson.version, name: packageJson.name, description: packageJson.description, timestamp: new Date().toISOString() }); } catch (error) { res.status(200).json({ version: '1.0.0', name: 'ADPA API', description: 'Document Processing API', timestamp: new Date().toISOString() }); } } } //# sourceMappingURL=HealthController.js.map