Created
September 3, 2014 02:16
-
-
Save imWildCat/fe2711da49f19bdd6443 to your computer and use it in GitHub Desktop.
BAE - mongoDB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
似乎不管用