You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am new at NestJs.
Is this example correct? I have no Idea how to get the "configService" as described in the example.
I only can find examples with use of "useFactory".
No, you can't write like that. If you want to declare dynamic, you can use forRootAsync and useFactory
exactly!
This is a demo, and hope it can help you. @crea-vis-art
first, you need to create a .env file at your project root directory. Sure, you need to set your actual value.
Hi,
I am new at NestJs.
Is this example correct? I have no Idea how to get the "configService" as described in the example.
I only can find examples with use of "useFactory".
`import { RMQModule } from 'nestjs-rmq';
@module({
imports: [
RMQModule.forRoot({
exchangeName: configService.get('AMQP_EXCHANGE'),
connections: [
{
login: configService.get('AMQP_LOGIN'),
password: configService.get('AMQP_PASSWORD'),
host: configService.get('AMQP_HOST'),
},
],
}),
],
})
export class AppModule {}`
Sorry but don't get the code formating in the github editor
The text was updated successfully, but these errors were encountered: