Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

550 B
Raw Blame
import { Get, Controller, OnApplicationShutdown } from '@nestjs/common'
import { clickhouse } from './common/integrations/clickhouse'

const DEPLOYMENT_INFORMATION = {
  name: 'Swetrix API',
  repository: 'https://github.com/swetrix/swetrix',
  documentation: 'https://swetrix.com/docs',
  homepage: 'https://swetrix.com',
}

@Controller()
export class AppController implements OnApplicationShutdown {
  async onApplicationShutdown(): Promise<void> {
    await clickhouse.close()
  }

  @Get()
  root(): any {
    return DEPLOYMENT_INFORMATION
  }
}