2

I want to have different config for each module like specified here

But I am not able to achieve this, here is the issue that I am facing: https://github.com/nestjs/config/issues/947

All2Pie
  • 310
  • 3
  • 13

1 Answers1

1

I don't fully understand why you need such behaviour, and maybe with more information I could give you a more detailed input. However, from the information you provided, I would suggest to keep the configuration variables globally scoped and avoid name collisions, not only for design purposes but for readability also. If you have a lot of configuration variables, you can always separate them into different JSON files and load them from each module, but naming them differently. Let me know if this is a viable solution for your problem.

Agus Neira
  • 435
  • 4
  • 9
  • I want to do database seeding in microservices. Every service has same json object for the database configurations so it is not applicable for me. PS: I am using Nestjs workspaces for monorepo – All2Pie May 31 '22 at 08:19