title: Node.js global require
body: <p>how can i require a module globally so i can use it in different modules without having to require it again?
  or do i just have to do that everytime?
  is there any best practice for this?</p>
  
  <p>heres an example of what i am talking about.
  lets say i have an <strong>index.js</strong> like this:</p>
  
  <pre><code>var a = require('a.js'),
  utils = require('utils.js');
  
  var str = 'hello this is a test';
  str = a.change(str);
  
  utils.return(str);
  </code></pre>
  
  <p><strong>a.js</strong></p>
  
  <pre><code>var utils = require('utils.js');
  
  exports.change = function(str) {
      str = str.replace('test', 'example');
      utils.return('i changed test to example!');
      return str;
  }
  </code></pre>
  
  <p><strong>utils.js</strong></p>
  
  <pre><code>exports.return = function (msg) {
      console.log(msg);
  }
  </code></pre>
  
  <p>you see i have to require('utils.js') twice, but i would rather require it once in the index.js and have it available in the index.js and a.js as utils.
  is there any good way to accomplish that?</p>