Properly close mongoose's connection once you're done

后端 未结 7 760
没有蜡笔的小新
没有蜡笔的小新 2020-12-07 17:20

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

相关标签:
7条回答
  • 2020-12-07 17:56

    The other answer didn't work for me. I had to use mongoose.disconnect(); as stated in this answer.

    0 讨论(0)
提交回复
热议问题