chore: import DH V2 D5.6.4 production baseline
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { DataSource } from 'typeorm';
|
||||
import { API_PHASE, API_VERSION } from './version';
|
||||
|
||||
@Injectable()
|
||||
export class HealthService {
|
||||
constructor(private readonly dataSource: DataSource) {}
|
||||
|
||||
async check() {
|
||||
const startedAt = Date.now();
|
||||
await this.dataSource.query('SELECT 1');
|
||||
|
||||
return {
|
||||
status: 'ok',
|
||||
service: 'dhv2-api',
|
||||
api: 'v3',
|
||||
version: API_VERSION,
|
||||
phase: API_PHASE,
|
||||
database: 'ok',
|
||||
time: new Date().toISOString(),
|
||||
latencyMs: Date.now() - startedAt,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user