node-mongo icon indicating copy to clipboard operation
node-mongo copied to clipboard

Watching changes

Open markosole opened this issue 2 years ago • 4 comments

Hi all,

I am wondering would this allow me to watch for for a changes (Event Handlers section) and trigger something? I've setup simple query which works just fine, but event has never been triggered when data in DB is changed

userService.on('updated', ({ doc, prevDoc }) => { console.log("Here we go, change!")});

Would this supposed to work if I update any record?

Thanks!

markosole avatar Dec 12 '21 17:12 markosole