Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Disconnect method to close DB connection
Browse files Browse the repository at this point in the history
  • Loading branch information
ilanbiala committed Mar 6, 2015
1 parent 9e1a6aa commit e954a20
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/lib/mongoose.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,8 @@ module.exports.connect = function(cb) {
}
});
};

module.exports.disconnect = function() {
mongoose.disconnect();
console.info(chalk.yellow('Disconnected from MongoDB.'));
};

0 comments on commit e954a20

Please sign in to comment.