@dxdeveloperexperience/hygie
Version:
Hygie is an easy-to-use Open-Source REST API allowing you to interact with GIT events. This NestJS API expose a set of customizable rules to automate your project's life cycle.
21 lines (17 loc) • 630 B
text/typescript
import { Controller, Get, Res, Header, HttpStatus } from '@nestjs/common';
import { PrometheusService } from '../logger/prometheus.service';
import { logger } from '../logger/logger.service';
import { join } from 'path';
import { Utils } from '../utils/utils';
()
export class ApplicationController {
constructor(private readonly prometheus: PrometheusService) {}
('/')
async welcome(() response): Promise<string> {
return response.status(HttpStatus.OK).send(Utils.renderHbs('homepage'));
}
('/metrics')
getMetrics(): any {
return this.prometheus.Prometheus.register.metrics();
}
}