Skip to content

Instantly share code, notes, and snippets.

@imWildCat
Created September 3, 2014 02:16
Show Gist options
  • Save imWildCat/fe2711da49f19bdd6443 to your computer and use it in GitHub Desktop.
Save imWildCat/fe2711da49f19bdd6443 to your computer and use it in GitHub Desktop.
BAE - mongoDB
var mongoose = require('mongoose');
var config = require('../config');
var db = mongoose.createConnection();
var options = {
db: { native_parser: true },
server: {
poolSize: 5,
// 增加自动重连配置,不知道是否奏效
auto_reconnect: true
},
user: config.db.user,
pass: config.db.pass
};
@yuedun
Copy link

yuedun commented Sep 13, 2014

似乎不管用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment