MCPcopy Create free account
hub / github.com/RemoteState/nodejs-ecs / HealthController

Class HealthController

src/controller/healthController.ts:3–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1import { NextFunction, Request, Response } from 'express';
2
3export 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected