MongoDB oplog stream wrapper
npm install oplog-stream
var oplog = require('oplog-stream')
oplog(function (err, stream) {
if (err) {
throw err
}
stream.on('data', function (data) {
console.log(data)
})
stream.on('error', function () {
throw err
})
})
stream.destroy() // also closes connection to db