set isPrimary to true if its undefined

isPrimary was undefined if you are using clustering by adding
isCluster:true to config.json, run 1 nodebb process on each virtual
machine and use app.js instead of loader.js
This commit is contained in:
Barış Soner Uşaklı
2018-06-07 13:10:12 -04:00
parent f51bab5d86
commit b2d7455f72

View File

@@ -42,6 +42,8 @@ function loadConfig(configFile) {
nconf.set('isPrimary', 'true');
nconf.set('isCluster', 'false');
}
var isPrimary = nconf.get('isPrimary');
nconf.set('isPrimary', isPrimary === undefined ? 'true' : isPrimary);
// Ensure themes_path is a full filepath
nconf.set('themes_path', path.resolve(dirname, nconf.get('themes_path')));