title: Strange difference between MongoDb on Windows and Macintosh
body: <p>I'm developing a node.js/mongodb app on Macintosh but I also like my code to work on Windows.</p>
  
  <p>The following code works on the Mac but not on Windows:</p>
  
  <pre><code>var Server = require('mongodb').Server,
      Db = require('mongodb').Db;
  
  var db = new Db('bookdb', new Server('localhost', 27017));
  
  db.collection('books').insert({ author: 'bla' });
  </code></pre>
  
  <p>On Windows I have to add a call to db.open to make it work:</p>
  
  <pre><code>var Server = require('mongodb').Server,
      Db = require('mongodb').Db;
  
  var db = new Db('bookdb', new Server('localhost', 27017));
  
  db.open(function(err, db) {
      db.collection('books').insert({ author: 'bla' });
  });
  </code></pre>
  
  <p>Does anybody know why this difference exists?</p>
  
  <p>Thanks</p>