feat(api): add dedicated /health endpoint with timestamp

Separate root route from health check endpoint. The /health endpoint
now returns timestamp for monitoring integration.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Ho Ngoc Hai
2026-04-08 23:06:53 +07:00
parent ec4a960aed
commit 657905f7fc

View File

@@ -3,7 +3,12 @@ import { Controller, Get } from '@nestjs/common';
@Controller()
export class AppController {
@Get()
healthCheck() {
root() {
return { status: 'ok', service: 'goodgo-api' };
}
@Get('health')
healthCheck() {
return { status: 'ok', service: 'goodgo-api', timestamp: new Date().toISOString() };
}
}