title: How to get Data from MongoDb using mongoose?
body: <p>I just started learning MongoDB and mongoose. Currently I have the following structure:</p>
  
  <pre><code>database   -&gt; skeletonDatabase
  collection -&gt; adminLogin
  </code></pre>
  
  <p>When I run <code>db.adminLogin.find()</code> from the command line I get:</p>
  
  <pre><code>{ "_id" : ObjectId("52lhafkjasfadsfea"), "username" : "xxxx", "password" : "xxxx" }
  </code></pre>
  
  <p><strong>My connection</strong> <em>(this works, just adding it FYI)</em></p>
  
  <pre><code>module.exports = function(mongoose)
  {
      mongoose.connect('mongodb://localhost/skeletonDatabase');
  
      var db = mongoose.connection;
      db.on('error', console.error.bind(console, 'connection error:'));
      db.once('open', function callback () {
          console.log('Conntected To Mongo Database');
      });
  }
  </code></pre>
  
  <p><strong>My -js-</strong></p>
  
  <pre><code>module.exports = function(mongoose)
  {
      var Schema = mongoose.Schema;
  
      // login schema
      var adminLogin = new Schema({
          username: String,
          password: String
      });
  
      var adminLoginModel = mongoose.model('adminLogin', adminLogin);
      var adminLogin = mongoose.model("adminLogin");
  
      adminLogin.find({}, function(err, data){
          console.log("&gt;&gt;&gt;&gt; " + data );
      });
  }
  </code></pre>
  
  <p>My <code>console.log()</code> returns as <code>&gt;&gt;&gt;&gt;</code></p>
  
  <p>So what am I doing wrong here? Why do I not get any data in my console log? Thanks in advance for any help.</p>