From 374b45c1260cab3a8c26706241a0496152f0856d Mon Sep 17 00:00:00 2001 From: Liran Tal Date: Tue, 18 Nov 2014 23:00:52 +0200 Subject: [PATCH 1/3] providing more verbose output for current nodejs app configuration on application startup --- server.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 98d108bbcb..a88f8feccf 100755 --- a/server.js +++ b/server.js @@ -33,4 +33,9 @@ app.listen(config.port); exports = module.exports = app; // Logging initialization -console.log('MEAN.JS application started on port ' + config.port); \ No newline at end of file +console.log('--'); +console.log(chalk.green(config.app.title + ' application started')); +console.log(chalk.green('Environment:\t\t\t' + process.env.NODE_ENV)); +console.log(chalk.green('Port:\t\t\t\t' + config.port)); +console.log(chalk.green('Database:\t\t\t' + config.db)); +console.log('--'); \ No newline at end of file From e2b91b0f84d6585d1d4f90c8d6a335b7bed5fc28 Mon Sep 17 00:00:00 2001 From: Liran Tal Date: Thu, 20 Nov 2014 20:36:20 +0200 Subject: [PATCH 2/3] removing debug information for current environment configuration which is replaced by new output --- config/init.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/init.js b/config/init.js index 6facd9d0f8..34af434f3b 100644 --- a/config/init.js +++ b/config/init.js @@ -25,8 +25,6 @@ module.exports = function() { } process.env.NODE_ENV = 'development'; - } else { - console.log(chalk.black.bgWhite('Application loaded using the "' + process.env.NODE_ENV + '" environment configuration')); } }); From 2786c954e9e7d68fde6c74da5ced7efbc1bb7ee9 Mon Sep 17 00:00:00 2001 From: Liran Tal Date: Wed, 26 Nov 2014 20:21:08 +0200 Subject: [PATCH 3/3] updating debug information to support https mode reporting --- config/express.js | 3 --- server.js | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/express.js b/config/express.js index 9b133a6896..b893259f56 100755 --- a/config/express.js +++ b/config/express.js @@ -144,9 +144,6 @@ module.exports = function(db) { }); if (process.env.NODE_ENV === 'secure') { - // Log SSL usage - console.log('Securely using https protocol'); - // Load SSL key and certificate var privateKey = fs.readFileSync('./config/sslcerts/key.pem', 'utf8'); var certificate = fs.readFileSync('./config/sslcerts/cert.pem', 'utf8'); diff --git a/server.js b/server.js index a88f8feccf..8f54163280 100755 --- a/server.js +++ b/server.js @@ -38,4 +38,7 @@ console.log(chalk.green(config.app.title + ' application started')); console.log(chalk.green('Environment:\t\t\t' + process.env.NODE_ENV)); console.log(chalk.green('Port:\t\t\t\t' + config.port)); console.log(chalk.green('Database:\t\t\t' + config.db)); +if (process.env.NODE_ENV === 'secure') { + console.log(chalk.green('HTTPs:\t\t\t\ton')); +} console.log('--'); \ No newline at end of file