I cannot for the life of me figure out why this doesn't finish:
var pmongo = require('promised-mongo');
var db = pmongo('mongodb://localhost/builder');
var block_id = '538d097bbb12479d0e9f70ab';
var collection = db.collection('block');
collection.findOne({_id:db.ObjectId(block_id)})
.then(function(result) {
console.dir(result);
}).done();
It bascially just hangs. findOne returns a promise, I'm calling done. Strangely, when I close the database (ie db.close()) in the then, it finishes.
I'm trying to eventually make this handled via express, so I don't really want to close the database. What's the trick????