mirror of
https://github.com/tedkulp/vidgrab
synced 2026-03-05 13:20:27 -05:00
44 lines
1.2 KiB
TypeScript
44 lines
1.2 KiB
TypeScript
import { Module } from '@nestjs/common';
|
|
import { ServeStaticModule } from '@nestjs/serve-static';
|
|
import { join } from 'path';
|
|
import { ConfigModule, ConfigService } from '@nestjs/config';
|
|
import { EventEmitterModule } from '@nestjs/event-emitter';
|
|
import { BullModule } from '@nestjs/bull';
|
|
|
|
import { AppController } from './app.controller';
|
|
import { AppService } from './app.service';
|
|
import { WebModule } from '../web/web.module';
|
|
import { YtdlModule } from '../ytdl/ytdl.module';
|
|
|
|
@Module({
|
|
imports: [
|
|
ConfigModule.forRoot({
|
|
ignoreEnvFile: true,
|
|
isGlobal: true,
|
|
// load: [configuration],
|
|
}),
|
|
EventEmitterModule.forRoot({
|
|
wildcard: true,
|
|
}),
|
|
BullModule.forRootAsync({
|
|
imports: [ConfigModule],
|
|
useFactory: (configService: ConfigService) => ({
|
|
redis: {
|
|
host: configService.get('redisHost'),
|
|
port: configService.get('redisPort'),
|
|
},
|
|
prefix: 'vgqueue',
|
|
}),
|
|
inject: [ConfigService],
|
|
}),
|
|
ServeStaticModule.forRoot({
|
|
rootPath: join(__dirname, '..', 'client'),
|
|
}),
|
|
YtdlModule,
|
|
WebModule,
|
|
],
|
|
controllers: [AppController],
|
|
providers: [AppService],
|
|
})
|
|
export class AppModule {}
|