How to track offline changes

I have a node.js app and use collection.watch() method for tracking realtime changes.
But when i start my program I also need to know what changes have been made to collection (like insert or update) when my app was offline

Is there any way to implement that functionality?

Yes, you can use a kafka connector