app.module.ts 719 B

12345678910111213141516171819202122
  1. import { Module } from '@nestjs/common';
  2. import { TypeOrmModule } from '@nestjs/typeorm';
  3. import { AppController } from './app.controller';
  4. import { AppService } from './app.service';
  5. import { PalmOilModule } from './palm-oil/palm-oil.module';
  6. import { SurveillanceModule } from './surveillance/surveillance.module';
  7. @Module({
  8. imports: [
  9. TypeOrmModule.forRoot({
  10. type: 'sqlite',
  11. database: 'palm_history.db',
  12. autoLoadEntities: true,
  13. synchronize: true, // Auto-create tables (use only for development)
  14. }),
  15. PalmOilModule,
  16. SurveillanceModule, // Lego 09 — boots PID polling on startup
  17. ],
  18. controllers: [AppController],
  19. providers: [AppService],
  20. })
  21. export class AppModule {}