changeStream MongoDB live data on nodeJs

Viewed 15

I'm making an app that has to show real-time data from a MongoDB database. I've found the changeStream and I think it's the function that I need for this project, but I can't render that value on the front end... anyone can help me?

for this project, I use express, mongoose, and ejs

I've tried to redirect after and on the changeStream trigger but returns me an error "cannot set headers after they are sent to the client", and I try to re-render the page with the same error...

Thanks

0 Answers
Related