title: Understanding NodeJS's exports/require
body: <p>I am playing around with node.js exports and require. Take the default express app for instance:</p>
  
  <p>At the bottom of the app.js code, there is something that looks like this: <code>app.get('/', routes.index);</code> That means that I can have more routes specified, like this:</p>
  
  <pre><code>app.get('/login', routes.login);
  app.get('/logout', routes.logout);
  </code></pre>
  
  <p>etc. To better understand the exports/require thing, I am trying to put those in a separate file. I am trying it this way:</p>
  
  <pre><code>//app.js
  var gets = require('./gets'),
  exports.foo = app;
  
  //gets.js
  var app = require('./app');
  console.log(app); //returns empty obj {}
  </code></pre>
  
  <p>Why is it? Can you help me understand what I am doing wrong?
  Thanks in advance.</p>