|
|
|
@ -55,8 +55,13 @@
|
|
|
|
|
winston.error('Unable to initialize MongoDB! Is MongoDB installed? Error :' + err.message);
|
|
|
|
|
process.exit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mongoClient.connect('mongodb://'+ nconf.get('mongo:host') + ':' + nconf.get('mongo:port') + '/' + nconf.get('mongo:database'), function(err, _db) {
|
|
|
|
|
var connString = 'mongodb://'+ nconf.get('mongo:host') + ':' + nconf.get('mongo:port') + '/' + nconf.get('mongo:database');
|
|
|
|
|
var connOptions = {
|
|
|
|
|
server: {
|
|
|
|
|
poolSize: 10
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
mongoClient.connect(connString, connOptions, function(err, _db) {
|
|
|
|
|
if(err) {
|
|
|
|
|
winston.error("NodeBB could not connect to your Mongo database. Mongo returned the following error: " + err.message);
|
|
|
|
|
process.exit();
|
|
|
|
|