is-mongo
v0.4.0
Published
Check if mongo db is running on port 27017
Downloads
14
Readme
is-mongo
Check if a mongodb is running
See the dbs module for more database types.
Install
$ npm install --save is-mongo
Usage
Node.js
var isMongo = require('is-mongo');
// Callback
isMongo(function(db) {
console.log(db.running);
//=> true
});
// Promise
isMongo().then(function(db) {
console.log(db.type);
//=> mongo
});
CLI
$ npm install -g is-mongo
$ is-mongo
#=> Up
License
MIT © Charlie Dowler