From 59083fc34c52a68dced72c5a095653dfba5c5dc6 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 11 Jul 2013 12:10:45 -0400 Subject: [PATCH 1/2] updating the main init script to output debug logs containing the GNU copyright disclaimer, as well as port information (to make log debugging easier). Also added more information to the "Categories OK" message --- app.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index d74b7cf513..ff8d96062d 100644 --- a/app.js +++ b/app.js @@ -2,6 +2,7 @@ var fs = require('fs'), path = require('path'), utils = require('./public/src/utils.js'), + ver = '0.0.2', args = {}; // Runtime environment @@ -15,12 +16,18 @@ process.argv.slice(2).forEach(function(value) { } }); -console.log('Info: Checking for valid base configuration file'); +// Log GNU copyright info along with server info +console.log('Info: NodeBB v' + ver + ' Copyright (C) 2013 Design Create Play Inc.'); +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: ==='); + fs.readFile(path.join(__dirname, 'config.json'), function(err, data) { if (!err && args.setup !== true) { global.config = JSON.parse(data); global.config.url = global.config.base_url + (global.config.use_port ? ':' + global.config.port : '') + '/'; global.config.upload_url = global.config.url + 'uploads/'; + console.log('Info: Initializing NodeBB v' + ver + ', on port ' + global.config.port + ', using Redis store at ' + global.config.redis.host + ':' + global.config.redis.port + '.'); console.log('Info: Base Configuration OK.'); var meta = require('./src/meta.js'); @@ -79,7 +86,7 @@ fs.readFile(path.join(__dirname, 'config.json'), function(err, data) { var user = require('./src/user.js'); user.makeAdministrator(1); } else { - console.log('Info: Good.'); + console.log('Info: Categories OK. Found ' + data.categories.length + ' categories.'); } }); } From e35ccf4aa6cdca571495dd03c03559edc13b5815 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 11 Jul 2013 12:14:49 -0400 Subject: [PATCH 2/2] more copyright info at top of app.js --- app.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index ff8d96062d..029fe4d628 100644 --- a/app.js +++ b/app.js @@ -1,3 +1,21 @@ +/* + NodeBB - A forum powered by node in development by designcreateplay + Copyright (C) 2013 DesignCreatePlay Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + // Read config.js to grab redis info var fs = require('fs'), path = require('path'), @@ -17,7 +35,7 @@ process.argv.slice(2).forEach(function(value) { }); // Log GNU copyright info along with server info -console.log('Info: NodeBB v' + ver + ' Copyright (C) 2013 Design Create Play Inc.'); +console.log('Info: NodeBB v' + ver + ' Copyright (C) 2013 DesignCreatePlay Inc.'); 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: ===');