dino-express
Version:
DinO enabled REST framework based on express
20 lines (19 loc) • 743 B
TypeScript
import { type ApplicationContext, Monitor } from 'dino-core';
import { type NextFunction, type Request, type Response } from 'express';
/**
* The health monitor handler used to define the express error handling behaviour
* @public
*/
export declare class ApplicationStateMonitor {
private readonly monitors;
private readonly applicationContext;
constructor(applicationContext: ApplicationContext);
doMonitor(res: Response): Response;
private getApplicationStateMonitors;
/**
* Allows to add a monitor
* @param {Monitor} monitor
*/
addMonitor(monitor: Monitor): ApplicationStateMonitor;
middleware(): (_req: Request, res: Response, _next: NextFunction) => Response<any, Record<string, any>>;
}