import { Controller , Get } from '@nestjs/common' ; import { HealthCheckService , HttpHealthIndicator , HealthCheck , } from '@nestjs/terminus' ; @ Controller ( 'health' ) export class HealthController { constructor ( private health , private http ) { } @ Get ( ) @ HealthCheck ( ) check ( ) { return this . health . check ( [ ( ) => this . http . pingCheck ( 'nestjs-docs' , 'https://docs.nestjs.com' ) , ] ) ; } }