You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
juzerali edited this page Sep 13, 2012
·
2 revisions
skin=require"mongoskin"db=skin.db"localhost:27017/local"#Cursor on oplog (a capped collection) which maintains a history for replication#oplog can be used only when replication is enabled# Use oplog.rs instead of oplog.$main if you are using replica setoplog=db.collection"oplog.$main"cursor=oplog.find({'ns':"icanvc.projects"},{tailable:yes, awaitData:yes})
#Using cursor.nextObject will be slowcursor.each (err, log)->console.error err if err
console.log log ifnot err