Skip to content

Commit

Permalink
fix: move upload_url to prestart so it is defined in upgrade scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Mar 22, 2019
1 parent cead89f commit ad2d7a6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions src/prestart.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ function loadConfig(configFile) {
nconf.set('base_templates_path', path.join(nconf.get('themes_path'), 'nodebb-theme-persona/templates'));

nconf.set('upload_path', path.resolve(nconf.get('base_dir'), nconf.get('upload_path')));
nconf.set('upload_url', '/assets/uploads');

if (nconf.get('url')) {
nconf.set('url_parsed', url.parse(nconf.get('url')));
Expand Down
1 change: 0 additions & 1 deletion src/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ function setupConfigs() {
nconf.set('use_port', !!urlObject.port);
nconf.set('relative_path', relativePath);
nconf.set('port', nconf.get('PORT') || nconf.get('port') || urlObject.port || (nconf.get('PORT_ENV_VAR') ? nconf.get(nconf.get('PORT_ENV_VAR')) : false) || 4567);
nconf.set('upload_url', '/assets/uploads');
}

function printStartupInfo() {
Expand Down

0 comments on commit ad2d7a6

Please sign in to comment.