Is there anyway to use replSetGetStatus in Meteor


#1

Can I use this somehow in my app? https://docs.mongodb.com/v3.4/reference/command/replSetGetStatus/#replsetgetstatus


#2

On the server:

var funcInputObj = {replSetGetStatus : 1};
var mongoFuncName= ‘db.adminCommand’;
MongoInternals.defaultRemoteCollectionDriver().mongo.db.eval(
'db.loadServerScripts();return ’ + mongoFuncName+ ‘(’ + JSON.stringify(funcInputObj|| {}) + ‘);’,
function (err, mongoFuncReturnData) {
console.log(mongoFuncReturnData);
});