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:
@@ -3,7 +3,12 @@ import { Controller, Get } from '@nestjs/common';
|
|||||||
@Controller()
|
@Controller()
|
||||||
export class AppController {
|
export class AppController {
|
||||||
@Get()
|
@Get()
|
||||||
healthCheck() {
|
root() {
|
||||||
return { status: 'ok', service: 'goodgo-api' };
|
return { status: 'ok', service: 'goodgo-api' };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Get('health')
|
||||||
|
healthCheck() {
|
||||||
|
return { status: 'ok', service: 'goodgo-api', timestamp: new Date().toISOString() };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user