在代理后面使用mongoose和mlab

Ric*_*újo 8 proxy mongoose mlab

如果我在代理后面,则无法连接到我的mlab数据库.

知道怎么做到这一点?我已经谷歌搜索,没有找到答案......

这是我的联系:

mongoose.connect(config.db.URI);
var db = mongoose.connection;
db.on('error', function(){
    throw new Error('unable to connect to database at ' + config.db.URI);
});
Run Code Online (Sandbox Code Playgroud)