Terminus module for Nest framework (node.js) :robot:
MikroOrmHealthIndicators
indicates as up even when disconnected (#2509) (#2511) (069b998), closes #2460
type: 'object'
instead of type: 'string'
, (44c06f6), closes #2516
result
as required in the Swagger Schema for the health check result (01ce13b), @srdanielilloproducerOnlyMode
per default (c6d8f7c), closes #1690
type
is deprecated (1c0eff9), closes #2259 , @StefanPrintezis⚠️ Node v12 is no longer supported (>= v16 is required).
npm i @nestjs/terminus@10
health.controller.ts
:@Controller()
export class HealthController {
constructor(
private readonly health: HealthCheckService,
private readonly prisma: PrismaHealthIndicator,
private readonly prismaService: PrismaService,
) {}
@Get('/health')
healthCheck() {
return this.health.check([
() => this.prisma.pingCheck('prisma', this.prismaService),
]);
}
}
Dependencies