Skip to content

Instantly share code, notes, and snippets.

@electblake
Last active August 30, 2015 15:21
Show Gist options
  • Select an option

  • Save electblake/322ef7a8b02d24ad7718 to your computer and use it in GitHub Desktop.

Select an option

Save electblake/322ef7a8b02d24ad7718 to your computer and use it in GitHub Desktop.
var mongoose = require('mongoose'),
log = require('./logger'),
cfg = require('./config');
module.exports = exports = function(app) {
mongoose.connect(cfg.MONGO_URI, function(err) {
if (err) {
log.error('lib/mongoose error', err);
log.warn('mongoose.connection.readyState', mongoose.connection.readyState);
}
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment