| 1 | import { NextFunction, Request, Response } from 'express'; |
| 2 | |
| 3 | export default class HealthController { |
| 4 | private static instance: HealthController; |
| 5 | private constructor() {} |
| 6 | |
| 7 | public static getInstance(): HealthController { |
| 8 | if (!HealthController.instance) { |
| 9 | HealthController.instance = new HealthController(); |
| 10 | } |
| 11 | return HealthController.instance; |
| 12 | } |
| 13 | |
| 14 | public async GetHealth(req: Request, res: Response, next: NextFunction) { |
| 15 | try { |
| 16 | res.status(200).send({ |
| 17 | status: 'okay', |
| 18 | }); |
| 19 | } catch (e) { |
| 20 | next(e); |
| 21 | } |
| 22 | } |
| 23 | } |
nothing calls this directly
no outgoing calls
no test coverage detected