title: Access function in another module.export in a separate file
body: <p>I have several javascript files that contain different parts of my node application.  They are required using the logic below.  I want to access a function in one file1.js from file2.js, but have had little success so far.  Any help would be appreciated, thanks.</p>
  
  <p>app.js:  This is the file where I start my server and include all the express routes.</p>
  
  <pre><code>require(path_to_file+'/'+file_name)(app, mongoose_database, config_file);  //Require a bunch fo files here in a loop.
  </code></pre>
  
  <p>file1.js:  This is an example file that is required using the code above. </p>
  
  <pre><code>module.exports = function(app, db, conf){
    function test() {  //Some function in a file being exported.
      console.log("YAY");
    }
  }
  </code></pre>
  
  <p>file2.js:  This is another file required using the code above.  I want to access a function in file1.js from within this file (file2.js).</p>
  
  <pre><code>module.exports = function(app, db, conf){
    function performTest() {  //Some function in a file being exported.
      test();
    }
  }
  </code></pre>