ponyfoo-db

Micro package which manages database reconnection

npm install ponyfoo-db
4 downloads in the last month

Pony Foo Db Manager

Micro package which manages database reconnection

Connects to MONGO_URI, reconnects automatically after disconnections. Logs errors over ponyfoo-log.

Install

Install it from npm.

npm i --save ponyfoo-db

Usage

Just use it, transports are taken care of via environment variables, configured through ponyfoo-env.

var db = require('ponyfoo-db');

db(function (err, connection) {
    // use connection
});

License

MIT

npm loves you