I need to find if mongo has been started. I am using this in some parallel testing where the pocesses are sandboxed. Right now I am checking to see if the port is open using the net module but I wonder if I can get this from the mongo code.
I see there is the serverStatus command for Mongo but running it like this doesn't return any info.
return new MongodbPrebuilt.MongoBins('mongo', ['--port', options.port, '--eval', "db.serverStatus()"]).run()
Is there a way to get the output of that command back?
I need to find if mongo has been started. I am using this in some parallel testing where the pocesses are sandboxed. Right now I am checking to see if the port is open using the
net
module but I wonder if I can get this from the mongo code.I see there is the
serverStatus
command for Mongo but running it like this doesn't return any info.Is there a way to get the output of that command back?