✅ Sign-up for a free cluster at: [ Ссылка ]
✅ Get help on our Community Forums: [ Ссылка ]
When you need to react immediately to changes in your MongoDB database, change streams and triggers can help you make that happen. In part four of this quick start tutorial for beginners, Lauren Schaefer explains three ways to monitor change streams in a Node.js script: using EventEmitter's on(), using ChangeStream's hasNext(), and using Node's Stream API. She also explains how to create triggers in MongoDB Atlas.
Chapters:
00:00 Intro
00:57 Change Streams
03:52 Monitoring Change Streams Using EventEmitter's on()
12:21 Monitoring Change Streams Using ChangStream's hasNext()
16:37 Monitoring Change Streams Using the Stream API
19:57 Resuming Change Streams
21:43 Triggers
27:16 Wrapping Up
Links Lauren mentions in the video:
Lauren's blog post: Change Streams & Triggers with Node.js Tutorial [ Ссылка ]
Lauren's GitHub repo with the code from this video [ Ссылка ]
Node.js & MongoDB Starter Template File [ Ссылка ]
Other videos in this tutorial series:
Part 1: [ Ссылка ]
Part 2: [ Ссылка ]
Part 3: [ Ссылка ]
Connect with Lauren:
Twitter: [ Ссылка ]
TikTok: [ Ссылка ]
Linkedin: [ Ссылка ]
MongoDB Community: [ Ссылка ]
Subscribe to MongoDB ►►► [ Ссылка ]
Connect with MongoDB:
Website: [ Ссылка ]
Twitter: [ Ссылка ]
Facebook: [ Ссылка ]
Linkedin: [ Ссылка ]
Instagram: [ Ссылка ]
Community Forums: [ Ссылка ]
TikTok: [ Ссылка ]
Ещё видео!