DEV Community

Discussion on: Advanced NestJS: How to build completely dynamic NestJS modules

Collapse
 
mickl profile image
Mick • Edited

@johnbiundo I cant find your e-mail address anywhere so I hope you read this comment. There was a comment already asking for the question I have, but you didnt answer it. This already took me hours and hours, days and days, but I cant find anything online, so I hope you might help!

When my module has other imports that need configuration (some examples are HttpModule, CacheModule, ClientsModule) and I want them to be configured by the options that are provided to my module (as you described in the article) but the provided options are not available to them.

Maybe try to import HttpModule to your MassiveModule and try to configure a value of it (e.g. timeout) by using one of your 3 providers. But I also made a simple sandbox repository to figure out a solution. Feel free to try it out there or even make a PR: github.com/MickL/nestjs-dynamic-mo...

There is also a question on Stackoverflow asking the exact same question 6 months ago: stackoverflow.com/questions/633564...

THANK YOU VERY MUCH! :)