Do I need to manually close a mongoose connection?

前端 未结 3 1378
别那么骄傲
别那么骄傲 2020-12-15 20:20

New to Node, Mongoose & Mongodb - haven\'t read the source code...

I have a Node application which opens a file, parses the lines into records and saves the reco

3条回答
  •  不思量自难忘°
    2020-12-15 20:46

    What JohnnyHK said is correct. Add "SIGTERM" as well.

    Simple example to use connection.close()

    https://gist.github.com/pasupulaphani/9463004#file-mongoose_connet-js

提交回复
热议问题