mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
fixed improper parsing of url in loader, and updated mongo init to not send anything in cb except err. Also updated webserver init so that it doesn't expect stuff from static:app.preload
This commit is contained in:
@@ -188,12 +188,12 @@ function forkWorker(index, isPrimary) {
|
||||
}
|
||||
|
||||
function getPorts() {
|
||||
var url = nconf.get('url');
|
||||
if (!url) {
|
||||
var _url = nconf.get('url');
|
||||
if (!_url) {
|
||||
console.log('[cluster] url is undefined, please check your config.json');
|
||||
process.exit();
|
||||
}
|
||||
var urlObject = url.parse(url);
|
||||
var urlObject = url.parse(_url);
|
||||
var port = nconf.get('port') || nconf.get('PORT') || urlObject.port || 4567;
|
||||
if (!Array.isArray(port)) {
|
||||
port = [port];
|
||||
|
||||
@@ -142,7 +142,9 @@
|
||||
|
||||
async.apply(createIndex, 'searchpost', {content: 'text', uid: 1, cid: 1}, {background: true}),
|
||||
async.apply(createIndex, 'searchpost', {id: 1}, {background: true})
|
||||
], callback);
|
||||
], function(err) {
|
||||
callback(err);
|
||||
});
|
||||
}
|
||||
|
||||
function createIndex(collection, index, options, callback) {
|
||||
|
||||
@@ -106,7 +106,7 @@ function initializeNodeBB(callback) {
|
||||
middleware: middleware
|
||||
}, next);
|
||||
},
|
||||
function(results, next) {
|
||||
function(next) {
|
||||
routes(app, middleware);
|
||||
next();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user