Skip to content

Close connection to mongodb for kill signal #2

Description

@bassemZohdy

close connections to database mongodb if the admin killed rest service using Ctrl+C refer to the below code & links:
process.on('SIGINT', function() {
console.log('Got SIGINT. Press Control-D to exit.');
});
http://stackoverflow.com/questions/8813838/properly-close-mongooses-connection-once-youre-done
http://stackoverflow.com/questions/19371821/do-i-need-to-manually-close-a-mongoose-connection

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions