Mongo Change Streams and Angular

Hello,
I’m working on an angular based web application using a nodejs backend to communicate to MongoDb. Is there a way for the MongoDb Change Streams to send messages directly to the frontend typescript of my angular app? I understand that the Change stream uses the built in Event Emitter from nodejs, and there was no support listed for typescript specifically in the documentation. I was just wondering if it could communicate with angular directly so I can avoid using WebSockets for this communication if possible.

Thank you!

Hi Matthew! Great to see a fellow Angular fan!

Yes, you can achieve something similar to change stream subscription from your frontend by leveraging Atlas App Services.

Check out my demo on the topic (it also uses Angular): https://www.youtube.com/watch?v=YixtWTGUyFk

1 Like