text: var MongoClient = require('mongodb').MongoClient;
  
  // Connect to the db
  MongoClient.connect("mongodb://localhost:27017/database", function (err, db) {
      
      db.collection('favorite', function (err, collection) {
          
           collection.find().toArray(function(err, items) {
              if(err) throw err;    
              console.log(items);            
          });
          
      });
                  
  });