Node.js based forum software built for the modern web
added upgrade file and nconf check
Baris Soner Usakli04e0d075ec94
diff --git a/app.js b/app.jsindex f693ea1dea..f9c2ab523b 100644--- a/app.js+++ b/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: ===');-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('upload_url', nconf.get('url') + 'uploads/');global.nconf = nconf;diff --git a/src/upgrade.js b/src/upgrade.jsnew file mode 100644index 0000000000..7e03e7575b--- /dev/null+++ b/src/upgrade.js@@ -0,0 +1,6 @@+++exports.upgrade = function() {+ console.log('upgrading nodebb now');++}\ No newline at end of file