From 657905f7fca4190c6d7b3f6f5d391b300a02ed21 Mon Sep 17 00:00:00 2001 From: Ho Ngoc Hai Date: Wed, 8 Apr 2026 23:06:53 +0700 Subject: [PATCH] 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 --- apps/api/src/app.controller.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/api/src/app.controller.ts b/apps/api/src/app.controller.ts index 306d93d..ab4d8dd 100644 --- a/apps/api/src/app.controller.ts +++ b/apps/api/src/app.controller.ts @@ -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() }; + } }