title: Unable to get variable from module exports
body: <p>I have a connector.js file which using which I want to export <code>dbResult</code> object.</p>
  
  <pre><code>(function(){
  var Massive = require("massive");
  
  var connectionString = "postgres://postgres:postgres@localhost/postgres";
  var db = Massive.connectSync({connectionString : connectionString});
  
  var dbResult ;
  
   db.query("Select * from company", function (err, data) {
          dbResult = data;
          console.log(data);
      });
  })(module.exports);
  </code></pre>
  
  <p>Now in Another file I am trying to get the dbResult and display the data:</p>
  
  <pre><code>var express = require("express");
  var app = express();
  
  var connectorObject = require("./Connector.js");
  
  var Massive = require("massive");
  
  app.get("/api/Steves",function(req,res){
  
          res.set("Content-Type","application/json");
          res.send(connectorObject.dbResult);
      });
  
  
  app.listen(3000);
  
  console.log("Server Started on port 3000...");
  </code></pre>
  
  <p>But when I start the URL , not able to see any response .</p>
  
  <p>Am I missing anything here.</p>