Check if a postgres is running
See the dbs module for more database types.
$ npm install --save is-postgres
var isPostgres = require('is-postgres');
// Callback
isPostgres(function(db) {
console.log(db.running);
//=> true
});
// Promise
isPostgres().then(function(db) {
console.log(db.type);
//=> postgres
});
$ npm install --global is-postgres
$ is-postgres
#=> Up
- 2014-10-20 v0.2.0 Cross platform support
- 2014-08-31 v0.1.0 Initial release
MIT © Charlie Dowler