mongoose close connection code example Example: mongoose connection close() mongoose.connection.close()