0

Is it necessary to close the mongoose connection using mongoose.connection.close() in code.

When will it be necessary to include this?

Saurav
  • 614
  • 7
  • 13
  • close it only if server shutdown, no need to reconnect in every query. – 王仁宏 Jan 24 '21 at 17:56
  • 1
    refer similar question [Do I need to manually close a mongoose connection?](https://stackoverflow.com/questions/19371821/do-i-need-to-manually-close-a-mongoose-connection) – turivishal Jan 24 '21 at 18:00

0 Answers0