title: return value to app.js file in node js
body: <p>I have two files, one called filename and the second called app.js, both files are on the server side. From filename.js filder I am returing a value string from ensureAuthentication method to app.js file, so i export the function: </p>
  
  <pre><code>function ensureAuthentication(){
    return 'tesstestest';
  }
  exports.ensureAuthentication = ensureAuthentication;
  </code></pre>
  
  <p>in app.js file i do following</p>
  
  <pre><code>var appjs = require('filename');
  console.log(appjs.ensureAuthentication);
  </code></pre>
  
  <p>result is always is undifined in console??! why is that any idea?</p>