These are chat archives for Automattic/mongoose

7th
Oct 2015
Chris
@drakoumel
Oct 07 2015 13:30
@vkarpov15
var uristring = process.env.MONGOLAB_URI ;

  mongoose.connect(uristring, function (err, res) {
  if (err) {
  console.log ('ERROR connecting to: ' + uristring + '. ' + err);
  } else {
  console.log ('Succeeded connected to: ' + uristring);
  }
});
and well now i have added uristring = uristring + '?authMechanism=SCRAM-SHA-1’;
Valeri Karpov
@vkarpov15
Oct 07 2015 14:49
what's the general format of your uri string? Don't tell me the host names, just replace those with 'HOSTNAME' or something
Josh Reeter
@jreeter
Oct 07 2015 15:48
hey guys if I want to handle mongoose promises with bluebird
do I need to wrap query calls in .resolve or should I spread on them?
Valeri Karpov
@vkarpov15
Oct 07 2015 20:17
@jreeter require('mongoose').Promise = require('bluebird'); if you're using mongoose >= 4.1.0