import { Controller, Get } from '@nestjs/common';
import { version } from '../package.json';
@Controller()
export class AppController {
  private start = Date.now();

  @Get('healthcheck')
  healthcheck() {
    const now = Date.now();
    return {
      status: 'API Online',
      uptime: Number((now - this.start) / 1000).toFixed(0),
      version: version,
    };
  }
}