I am using node js as front end and mongodb is as backend. I got successfull connection. But while trying to get all the process running in mongodb are throw error. My code is below.
var Db = require('mongodb').Db, Server = require('mongodb').Server;
var db = new Db('admin', new Server(conf.host, conf.port));
db.open(function(err, db1) {
var adminDb = db1.admin();
adminDb.authenticate(conf.user, conf.password, function(err, result) {
if(result == true) {
var obj = adminDb.currentOp({"active":true});
console.log("output="+output);
}
});
});
I am getting below error.
TypeError: adminDb.currentOp is not a function
via selvan
No comments:
Post a Comment