Deploy to production #56
			
				
			
		
		
		
	| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
import { BullModule } from '@nestjs/bull';
 | 
			
		||||
import { Global, Module } from '@nestjs/common';
 | 
			
		||||
import { ConfigModule } from '@nestjs/config';
 | 
			
		||||
import { ConfigModule, ConfigService } from '@nestjs/config';
 | 
			
		||||
import { EventEmitterModule } from '@nestjs/event-emitter';
 | 
			
		||||
import { ScheduleModule } from '@nestjs/schedule';
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -14,11 +14,15 @@ import { ScheduleModule } from '@nestjs/schedule';
 | 
			
		|||
      wildcard: true,
 | 
			
		||||
      global: true,
 | 
			
		||||
    }),
 | 
			
		||||
    BullModule.forRoot({
 | 
			
		||||
      redis: {
 | 
			
		||||
        host: 'localhost',
 | 
			
		||||
        port: 6379,
 | 
			
		||||
      },
 | 
			
		||||
    BullModule.forRootAsync({
 | 
			
		||||
      imports: [ConfigModule],
 | 
			
		||||
      useFactory: (configService: ConfigService) => ({
 | 
			
		||||
        redis: {
 | 
			
		||||
          host: configService.get<string>('REDIS_HOST'),
 | 
			
		||||
          port: configService.get<number>('REDIS_PORT'),
 | 
			
		||||
        },
 | 
			
		||||
      }),
 | 
			
		||||
      inject: [ConfigService],
 | 
			
		||||
    }),
 | 
			
		||||
    BullModule.registerQueue({
 | 
			
		||||
      name: 'mail-queue',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue