MVP реализации MoexVibe — NestJS бэкенд + React фронтенд + CI/CD #1
16
apps/backend/src/modules/health/health.controller.ts
Normal file
16
apps/backend/src/modules/health/health.controller.ts
Normal 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(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
7
apps/backend/src/modules/health/health.module.ts
Normal file
7
apps/backend/src/modules/health/health.module.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { Module } from '@nestjs/common';
|
||||||
|
import { HealthController } from './health.controller';
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
controllers: [HealthController],
|
||||||
|
})
|
||||||
|
export class HealthModule {}
|
||||||
Loading…
x
Reference in New Issue
Block a user