mongoose: use options

This commit is contained in:
Matteo Pagliazzi
2016-05-13 10:42:48 +02:00
parent 9514e9c5a8
commit 486b93a3c9
+1 -1
View File
@@ -13,7 +13,7 @@ let mongooseOptions = !IS_PROD ? {} : {
replset: { socketOptions: { keepAlive: 120, connectTimeoutMS: 30000 } },
server: { socketOptions: { keepAlive: 120, connectTimeoutMS: 30000 } },
};
let db = mongoose.connect(nconf.get('NODE_DB_URI'), (err) => {
let db = mongoose.connect(nconf.get('NODE_DB_URI'), mongooseOptions, (err) => {
if (err) throw err;
logger.info('Connected with Mongoose.');
});