Skip to content

Node.js based forum software built for the modern web

Merge branch 'cli-help' of https://github.com/RefinedSoftwareLLC/NodeBB into RefinedSoftwareLLC-cli-help

Julian Lam8ddf200ce7af
diff --cc app.js
index 075a029fbe,5a0bdcdaba..4324d6f2e4
--- a/app.js
+++ b/app.js
@@@ -66,7 -66,7 +66,7 @@@
nconf.set('upload_url', nconf.get('url') + 'uploads/');
winston.info('Initializing NodeBB v' + pkg.version + ', on port ' + nconf.get('port') + ', using Redis store at ' + nconf.get('redis:host') + ':' + nconf.get('redis:port') + '.');
- winston.info('NodeBB instance bound to: ' + (nconf.get('bind_address') || 'Any address'));
- winston.info('NodeBB instance bound to: ' + (nconf.get('bind_address') === "0.0.0.0" ? 'Any address (0.0.0.0)' : nconf.get('bind_address')));
++ winston.info('NodeBB instance bound to: ' + ((nconf.get('bind_address') === "0.0.0.0" || !nconf.get('bind_address')) ? 'Any address (0.0.0.0)' : nconf.get('bind_address')));
if (process.env.NODE_ENV === 'development') {
winston.info('Base Configuration OK.');
@@@ -107,20 -106,9 +107,10 @@@
]);
templates.ready(webserver.init);
+
+ Notifications.init();
});
-
- } else if (nconf.get('upgrade')) {
- nconf.file({
- file: __dirname + '/config.json'
- });
- meta = require('./src/meta.js');
-
- meta.configs.init(function () {
- require('./src/upgrade').upgrade();
- });
- } else {
-
+ } else if (nconf.get('setup') || !fs.existsSync(__dirname + '/config.json')) {
// New install, ask setup questions
if (nconf.get('setup')) {
winston.info('NodeBB Setup Triggered via Command Line');
@@@ -143,5 -131,24 +133,24 @@@
process.exit();
});
- }
- }());
-
++
+ } else if (nconf.get('upgrade')) {
+ nconf.file({
+ file: __dirname + '/config.json'
+ });
+ meta = require('./src/meta.js');
+
+ meta.configs.init(function () {
+ require('./src/upgrade').upgrade();
+ });
+ } else/* if (nconf.get('help') */{
+ winston.info('Usage: node app [options] [arguments]');
+ winston.info(' [NODE_ENV=development | NODE_ENV=production] node app [--start] [arguments]');
+ winston.info('');
+ winston.info('Options:');
+ winston.info(' --help displays this usage information');
+ winston.info(' --setup configure your environment and setup NodeBB');
+ winston.info(' --upgrade upgrade NodeBB, first read: github.com/designcreateplay/NodeBB/wiki/Upgrading-NodeBB');
+ winston.info(' --start manually start NodeBB (default when no options are given)');
+ };
+ }());