Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Enhancement logging app startup details #271

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions config/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 0 additions & 2 deletions config/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}
});

Expand Down
10 changes: 9 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,12 @@ app.listen(config.port);
exports = module.exports = app;

// Logging initialization
console.log('MEAN.JS application started on port ' + config.port);
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));
if (process.env.NODE_ENV === 'secure') {
console.log(chalk.green('HTTPs:\t\t\t\ton'));
}
console.log('--');