Merge pull request #1144 from farajfarook/server-output

fix(core): Adding server info to log initialization
This commit is contained in:
Cody B. Daig
2016-01-18 13:10:44 -08:00

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