I\'m using mongoose in a script that is not meant to run continuously, and I\'m facing what seems to be a very simple issue yet I can\'t find an answer; simply put once I ma
The other answer didn't work for me. I had to use mongoose.disconnect(); as stated in this answer.
mongoose.disconnect();