change stream #51
Answered
by
twlite
TentacleSama4254
asked this question in
Q&A
change stream
#51
-
is it possible to subscribe to a change stream and listen for an event when a value inside the database is updated? |
Beta Was this translation helpful? Give feedback.
Answered by
twlite
May 26, 2022
Replies: 1 comment 1 reply
-
Yes, this should be possible with const watcher = db.model.watch();
watcher.on("change", changes => console.log("Something changed", changes); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
twlite
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, this should be possible with