feat: create a health controller

This commit is contained in:
Sammy Teillet
2023-04-14 16:52:57 +02:00
parent 5468442d1e
commit bd884c7407
3 changed files with 236 additions and 19 deletions

View File

@ -0,0 +1,13 @@
import { Controller, Get } from '@nestjs/common';
import { HealthCheckService, HealthCheck } from '@nestjs/terminus';
@Controller('health')
export class HealthController {
constructor(private health: HealthCheckService) {}
@Get()
@HealthCheck()
check() {
return this.health.check([]);
}
}