title: How to use global variables in nest.js?
body: <p>Taking configuration as an example, the Nest.js documentation advocates registering Config Modules and injecting them into other modules in a dependency injection way.</p>
  <p>The benefits are obvious, and the dependencies and code are clear, but what if I have a nest.js project that needs to invoke the configuration information at startup? This actually caused me trouble.</p>
  <p>My idea is to use a store (actually a closure) to manage all the variables that might be needed globally, the client-side link objects, registered at startup, and introduced when needed.</p>
  <p>When corresponding variables are registered in this way, they can be introduced anywhere. The drawback is that you need to manage dependencies yourself.</p>
  <p>With the above concept design of demo: <a href="https://github.com/sophons-space/nest-server" rel="nofollow noreferrer">https://github.com/sophons-space/nest-server</a>.</p>
  <p>Please e help me correct, I am still a rookie.</p>