mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
added upgrade file and nconf check
This commit is contained in:
4
app.js
4
app.js
@@ -34,7 +34,9 @@ console.log('Info: This program comes with ABSOLUTELY NO WARRANTY.');
|
|||||||
console.log('Info: This is free software, and you are welcome to redistribute it under certain conditions.');
|
console.log('Info: This is free software, and you are welcome to redistribute it under certain conditions.');
|
||||||
console.log('Info: ===');
|
console.log('Info: ===');
|
||||||
|
|
||||||
if (!nconf.get('setup') && nconf.get('base_url')) {
|
if(nconf.get('upgrade')) {
|
||||||
|
require('./src/upgrade').upgrade();
|
||||||
|
} else if (!nconf.get('setup') && nconf.get('base_url')) {
|
||||||
nconf.set('url', nconf.get('base_url') + (nconf.get('use_port') ? ':' + nconf.get('port') : '') + nconf.get('relative_path') + '/');
|
nconf.set('url', nconf.get('base_url') + (nconf.get('use_port') ? ':' + nconf.get('port') : '') + nconf.get('relative_path') + '/');
|
||||||
nconf.set('upload_url', nconf.get('url') + 'uploads/');
|
nconf.set('upload_url', nconf.get('url') + 'uploads/');
|
||||||
global.nconf = nconf;
|
global.nconf = nconf;
|
||||||
|
|||||||
6
src/upgrade.js
Normal file
6
src/upgrade.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
exports.upgrade = function() {
|
||||||
|
console.log('upgrading nodebb now');
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user