import { Controller , Get } from '@nestjs/common' ; import { HealthCheck , HealthCheckService , TypeOrmHealthIndicator } from '@nestjs/terminus' ; @ Controller ( 'health' ) export class HealthController { constructor ( private health , private db ) { } @ Get ( ) @ HealthCheck ( ) check ( ) { return this . health . check ( [ async ( ) => this . db . pingCheck ( 'typeorm' ) ] ) ; } }