UNPKG

@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
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'; @Controller() export class ApplicationController { constructor(private readonly prometheus: PrometheusService) {} @Get('/') async welcome(@Res() response): Promise<string> { return response.status(HttpStatus.OK).send(Utils.renderHbs('homepage')); } @Get('/metrics') getMetrics(): any { return this.prometheus.Prometheus.register.metrics(); } }