Files
wwjcloud-nest-v1/wwjcloud/src/app.controller.ts

38 lines
746 B
TypeScript
Raw Normal View History

import { Controller, Get } from '@nestjs/common';
import { AppService } from './app.service';
import { Public } from './common/auth/decorators/public.decorator';
@Controller()
export class AppController {
constructor(private readonly appService: AppService) {}
@Get()
@Public()
getHello(): string {
return this.appService.getHello();
}
@Get('healthz')
@Public()
healthCheck() {
return {
status: 'ok',
timestamp: new Date().toISOString(),
uptime: process.uptime(),
};
}
@Get('readyz')
@Public()
readinessCheck() {
return {
status: 'ready',
timestamp: new Date().toISOString(),
services: {
redis: 'connected',
kafka: 'connected',
},
};
}
}