import { BullModule } from '@nestjs/bullmq'; import { Controller, Get, Module } from '@nestjs/common'; import { ScheduleModule } from '@nestjs/schedule'; import { env } from './config/env'; import { DbModule } from './db/db.module'; import { EmbeddingModule } from './embedding/embedding.module'; import { GenerationModule } from './generation/generation.module'; import { MerchantsHttpModule } from './merchants/merchants.controller.module'; import { ServingModule } from './serving/serving.module'; @Controller() class HealthController { @Get('health') health() { return { status: 'ok', llmProvider: env.llm.provider, embeddingProvider: env.embedding.provider, ts: new Date().toISOString(), }; } } @Module({ imports: [ DbModule, EmbeddingModule, ScheduleModule.forRoot(), BullModule.forRoot({ connection: { host: env.redis.host, port: env.redis.port } }), GenerationModule, MerchantsHttpModule, ServingModule, ], controllers: [HealthController], }) export class AppModule {}