feat: add health check endpoint

This commit is contained in:
Sergey Krylov 2026-06-13 18:51:40 +03:00
parent 5dcc1e12be
commit 173b65d5fc
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,16 @@
import { Controller, Get } from '@nestjs/common';
import { ApiTags, ApiOperation } from '@nestjs/swagger';
@ApiTags('Health')
@Controller('health')
export class HealthController {
@Get()
@ApiOperation({ summary: 'Проверка состояния сервиса' })
check() {
return {
status: 'ok',
timestamp: new Date().toISOString(),
uptime: process.uptime(),
};
}
}

View File

@ -0,0 +1,7 @@
import { Module } from '@nestjs/common';
import { HealthController } from './health.controller';
@Module({
controllers: [HealthController],
})
export class HealthModule {}