From b2d7455f723c9c2c550d9a05d413cdab832556a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 7 Jun 2018 13:10:12 -0400 Subject: [PATCH] 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 --- src/prestart.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/prestart.js b/src/prestart.js index 29fea6ee6b..dcc64cf527 100644 --- a/src/prestart.js +++ b/src/prestart.js @@ -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')));