docs: function connect(uri, callback) {
    console.log('connecting to database (' + uri + ')');
    mongo.MongoClient.connect(uri, {safe: true}, function (err, client) {
      if (err) return callback(err);
  
      db = client;
      db.addListener("error", function (error) {
        console.log("mongo client error: " + error);
      });
  
      callback(null, db);
    });
  }