mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-17 18:21:28 +10:00
14 lines
421 B
TypeScript
14 lines
421 B
TypeScript
import { Controller, Get } from '@nestjs/common';
|
|
import { HealthCheck, HealthCheckService, HttpHealthIndicator, TypeOrmHealthIndicator } from '@nestjs/terminus';
|
|
|
|
@Controller('health')
|
|
export class HealthController {
|
|
constructor(private health: HealthCheckService, private db: TypeOrmHealthIndicator) {}
|
|
|
|
@Get()
|
|
@HealthCheck()
|
|
check() {
|
|
return this.health.check([() => this.db.pingCheck('database')]);
|
|
}
|
|
}
|