import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { MetaGateway } from './meta.gateway';
import { RoomModule } from './room/room.module';
import { SceneModule } from './scene/scene.module';
// import { CacheModule } from './cache/cache.module';
import configuration from './config/configuration';
import { BullModule } from '@nestjs/bull';
import { RotateService } from './rotate/rotate.service';

@Module({
  imports: [
    ConfigModule.forRoot({ isGlobal: true, load: [configuration] }),
    RoomModule,
    SceneModule,
    BullModule.forRoot({
      redis: configuration().queueRedis,
    }),
    // CacheModule,
  ],
  controllers: [AppController],
  providers: [AppService, MetaGateway, RotateService],
})
export class AppModule {}
