Skip to content

Commit

Permalink
Merge pull request #48 from plus-tdd/feature/alarm
Browse files Browse the repository at this point in the history
health체크 - 로그 연속으로 오는거 막기 위한 테스트-01
  • Loading branch information
codesejin authored Jul 24, 2023
2 parents 971e134 + c8fc37e commit 18463c9
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/app.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@ export class AppController {
constructor(private readonly appService: AppService) {}

@Get()
getHello(): string {
getHello(): { statusCode: number; data: string } {
const logger = new Logger('application.app.controller')
logger.info('안녕하세요', '대문입니다.')
return this.appService.getHello();
const data = this.appService.getHello();
return { statusCode: 200, data };
}

@Get('/health')
getHealth(): { statusCode: number; data: string } {
const logger = new Logger('application.app.controller')
logger.info('Health check', '서비스 정상 동작 확인')
return { statusCode: 200, data: 'Health check passed!' };
}
}

0 comments on commit 18463c9

Please sign in to comment.