Reacting to Data Changes with MongoDB Change Streams
Change streams let your application subscribe to changes in a collection, database or entire cluster. Instead of polling, you get each insert, update and delete as it happens. Watching a collection const stream = orders.watch( [{ $match: { operationType: { $in...