0.0.3 • Published 11 years ago
mongoose-persistent-connector v0.0.3
mongoose-persistent-connector
DEPRECATED
The functionality that this module represents exists natively in the mongo driver by utilizing the
retryMiliSecondsandnumberOfRetriesoptions passed to the connect method.
mongoose-persistent-connector is a simple connection utility for mongoose/mongodb connections. It's a simple wrapper around the connection that will re-attempt connecting to the database upon when it disconnects on a specified retry interval.
Example:
var connector = require('mongoose-persistent-connector');
connector.connect('mongodb://127.0.0.1', {log: true, retryInterval: 6000});mongoURL
The url of the mongodb database. Defaults to mongodb://127.0.0.1.
connectionOpts
logSet this totrueto output log connection messages messages. Defaults totrue.retryIntervalNumber of milliseconds to wait between connection attempts. Defaults to6000.
mongoOpts
- MongodDB connection options passed to
mongoose.connect().