title: Unable to read collection data in mongo/node
body: <p>I am trying out mongoDB in nodeJs and am having trouble with the db collection file on the mongodb server. The server is setup as a window service so it is up and running. I got nodejs to connects to it when ran. I did the mock examples and it works (I think it is properly set up).</p>
  
  <p>If I want to see the collection created in nodejs it shows them. If I go to the mongodb server database(data\db folder) I see a collection has been created. The problem is when I open another instance of cmd.exe enter mongodb and want to see what is in the collection <em>db.collections-2</em> what returns is NaN. </p>
  
  <p>I may be doing something wrong or there is a missing file I am not aware of. Could someone please advise me and explain why I am getting NaN. </p>
  
  <p>The nodejs code is bellow.</p>
  
  <pre><code>var MongoClient=require('Mongodb').MongoClient,format = require('util').format;
  var url = 'mongodb://localhost:27017/myproject';
  MongoClient.connect(url,function(err,db){
      if(err){
          console.log(err);
  }
  else{
      console.log("connected to", url );
  } 
  var user1 = {name: 'modulus admin', age: 42, roles: ['admin', 'moderator', 'user']};
  var user2 = {name: 'modulus user', age: 22, roles: ['user']};
  var user3 = {name: 'modulus super admin', age: 92, roles: ['super-admin',  'admin', 'moderator', 'user']};
  
   collection.find({name: 'modulus user', roles:  'user'}).toArray(function(err, result) {
    if (err) {
      console.log(err);
    } else if (result.length) {
      console.log('Found:', result);
    } else {
      console.log('No document(s) found with defined "find" criteria!');
    }
  })
  
    db.close()
   })
  </code></pre>