fix(core): Adding server info to log initialization

Adding host information to the log initialization and aligning the
texts.
This commit is contained in:
Faraj Farook
2016-01-17 02:44:10 +05:30
parent 3dee3fc47a
commit 36e956ea71

View File

@@ -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);