title: What is the best way to pass common variables into separate modules in Node.js?
body: <p>I use separate router files as modules for main app and auth app. I can't get the best way to pass variables(db client) into routers. I don't want to hardcode it or pass it with:</p>
  
  <pre><code>module.exports = function(app, db) {
  </code></pre>
  
  <p>Maybe it's best way to use singleton register or use global db variable?</p>
  
  <p>What is your experiense with design-patterns? Which way is the best and why?</p>