Created
September 3, 2014 02:16
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
似乎不管用