mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
added authentication to mongo
This commit is contained in:
@@ -28,10 +28,14 @@
|
||||
|
||||
|
||||
// TODO : what is the db user name??
|
||||
/*if(nconf.get('mongo:password')) {
|
||||
db.authenticate(dbUser, nconf.get('mongo:password'), function (err) {
|
||||
if(nconf.get('mongo:password') && nconf.get('mongo:username')) {
|
||||
db.authenticate(nconf.get('mongo:username'), nconf.get('mongo:password'), function (err) {
|
||||
if(err) {
|
||||
winston.error(err.message);
|
||||
}
|
||||
process.exit();
|
||||
});
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
db.createCollection('objects', function(err, collection) {
|
||||
@@ -60,7 +64,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
callback(err);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user