mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-03-06 20:21:01 +01:00
fix(core): Adding server info to log initialization
Adding host information to the log initialization and aligning the texts.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user