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

Commit

Permalink
fix(core): Adding server info to log initialization
Browse files Browse the repository at this point in the history
Adding host information to the log initialization and aligning the
texts.
  • Loading branch information
farajfarook committed Jan 17, 2016
1 parent 3dee3fc commit 36e956e
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions config/lib/app.js
Expand Up @@ -39,19 +39,18 @@ module.exports.start = function start(callback) {

// Start the app by listening on <port> at <host>
app.listen(config.port, config.host, function () {

// Create server URL
var server = (process.env.NODE_ENV === 'secure' ? 'https://' : 'http://') + config.host + ':' + config.port;
// Logging initialization
console.log('--');
console.log(chalk.green(config.app.title));
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\t' + config.db.uri));
if (process.env.NODE_ENV === 'secure') {
console.log(chalk.green('HTTPs:\t\t\t\ton'));
}
console.log(chalk.green('App version:\t\t\t' + config.meanjs.version));
console.log();
console.log(chalk.green('Environment: ' + process.env.NODE_ENV));
console.log(chalk.green('Server: ' + server));
console.log(chalk.green('Database: ' + config.db.uri));
console.log(chalk.green('App version: ' + config.meanjs.version));
if (config.meanjs['meanjs-version'])
console.log(chalk.green('MEAN.JS version:\t\t\t' + config.meanjs['meanjs-version']));
console.log(chalk.green('MEAN.JS version: ' + config.meanjs['meanjs-version']));
console.log('--');

if (callback) callback(app, db, config);
Expand Down

0 comments on commit 36e956e

Please sign in to comment.