-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.module.ts
33 lines (32 loc) · 844 Bytes
/
app.module.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { BullModule } from '@nestjs/bull';
import { Module } from '@nestjs/common';
import { ClientsModule, Transport } from '@nestjs/microservices';
import { PROCESS_EXPORT } from './app.constants';
import { AppController } from './app.controller';
import { ExportProcessor } from './app.processor';
import { AppService } from './app.service';
@Module({
imports: [
ClientsModule.register([
{
name: 'MAILER2_SERVICE',
transport: Transport.REDIS,
options: {
url: 'redis://localhost:6379',
},
},
]),
BullModule.forRoot({
redis: {
host: 'localhost',
port: 6379,
},
}),
BullModule.registerQueue({
name: PROCESS_EXPORT,
}),
],
controllers: [AppController],
providers: [AppService, ExportProcessor],
})
export class AppModule {}