mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 23:45:45 +01:00
fix process.env.url if it was changed
This commit is contained in:
@@ -168,6 +168,9 @@ Loader.restart = function () {
|
|||||||
nconf.set('url', conf.url);
|
nconf.set('url', conf.url);
|
||||||
nconf.stores.env.readOnly = true;
|
nconf.stores.env.readOnly = true;
|
||||||
|
|
||||||
|
if (process.env.url !== conf.url) {
|
||||||
|
process.env.url = conf.url;
|
||||||
|
}
|
||||||
Loader.start();
|
Loader.start();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ function setupConfigs() {
|
|||||||
|
|
||||||
function printStartupInfo() {
|
function printStartupInfo() {
|
||||||
if (nconf.get('isPrimary') === 'true') {
|
if (nconf.get('isPrimary') === 'true') {
|
||||||
winston.info('Initializing NodeBB v%s', nconf.get('version'));
|
winston.info('Initializing NodeBB v%s %s', nconf.get('version'), nconf.get('url'));
|
||||||
|
|
||||||
var host = nconf.get(nconf.get('database') + ':host');
|
var host = nconf.get(nconf.get('database') + ':host');
|
||||||
var storeLocation = host ? 'at ' + host + (host.indexOf('/') === -1 ? ':' + nconf.get(nconf.get('database') + ':port') : '') : '';
|
var storeLocation = host ? 'at ' + host + (host.indexOf('/') === -1 ? ':' + nconf.get(nconf.get('database') + ':port') : '') : '';
|
||||||
|
|||||||
Reference in New Issue
Block a user