0
我正在使用nodejs mongo驱动程序连接到mongodb实例。代码如下所示。如何通过MongoDB驱动程序监听连接中断
// Retrieve
var MongoClient = require('mongodb').MongoClient;
// Connect to the db
MongoClient.connect("mongodb://localhost:27017/exampleDb", function(err, db) {
...
我该如何监听连接中断的变化。如果连接断开,我希望得到通知。 MongoDB nodejs驱动程序是否支持它?