File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -232,6 +232,31 @@ import { HttpModule } from "@nodeflip/nest-axios-http";
232232})
233233export class AppModule {}
234234
235+ ```
236+
237+ ### Inject other modules and use it
238+
239+ ``` typescript
240+
241+ import { Module } from " @nestjs/common" ;
242+ import { HttpModule } from " @nodeflip/nest-axios-http" ;
243+
244+ @Module ({
245+ imports: [
246+ HttpModule .forFeatureAsync ({
247+ logger: customLogger , // Custom logger instance
248+ serviceName: ' MyService' , // Service name for logging
249+ inject: [ConfigService ],
250+ useFactory : (configService : ConfigService ) => {
251+ return {
252+ baseURL: configService .get (' API_BASE_URL' ),
253+ enableLogging: configService .get (' ENABLE_LOGGING' ),
254+ }
255+ }
256+ }),
257+ ],
258+ })
259+
235260```
236261## License
237262
You can’t perform that action at this time.
0 commit comments