mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-21 19:47:21 -06:00
18 lines
547 B
TypeScript
18 lines
547 B
TypeScript
import { RequestHandler, Router } from "express";
|
|
import { RouterBroker } from "../abstract/abstract.router";
|
|
import { HttpStatus } from "./index.router";
|
|
import { healthController } from "@api/server.module";
|
|
|
|
|
|
export class HealthRouter extends RouterBroker {
|
|
constructor() {
|
|
super();
|
|
this.router
|
|
.get(this.routerPath('healthz', false), async (req, res) => {
|
|
await healthController.checkHealth();
|
|
return res.status(HttpStatus.OK).json({msg: 'healthy'});
|
|
})
|
|
}
|
|
|
|
public readonly router: Router = Router();
|
|
} |