Confirming connection & manual closing?

Besides my own “console logs” - how can I validate - with code - that my connection is open?

Also, how do I keep a persistent connection open until all operations are finished?

My connection keeps closing before my code runs and I get: `MongoClient must be connected to perform this operation

Hi @Kevin_Izevbigie,

This isn’t the expected behaviour. I guess something must be wrong in your code. Which language are your using? Can you share the code maybe on GitHub or in here if it’s small enough?

Sure – here

Check out the db.js and script.js