Debug fixes

This commit is contained in:
Juan Ferrer Toribio 2018-02-09 12:43:14 +01:00
parent 6af6ca9c34
commit d369db9dc0
4 changed files with 12 additions and 11 deletions

View File

@ -149,6 +149,7 @@ gulp.task('nginx-start', ['nginx-conf'], async () => {
if (isWindows)
nginxBin = `start /B ${nginxBin}`;
log(`Application will be at http://${proxyConf.host}:${proxyConf.port}/`);
await execP(`${nginxBin} -c "${nginxConf}" -p "${nginxDir}"`);
});

View File

@ -36,14 +36,16 @@ function vnBoot(app, rootDir, rootModule) {
// Initialization
let packageJson = require(rootDir + '/../package.json');
let appName = packageJson.name;
app.start = function(port) {
function onListen() {
app.emit('started');
let baseUrl = app.get('url').replace(/\/$/, '');
console.log(`Web server ${appName} listening at: %s`, baseUrl);
if (require.main === rootModule) {
let packageJson = require(`${rootDir}/../package.json`);
let appName = packageJson.name;
let baseUrl = app.get('url').replace(/\/$/, '');
console.log(`Web server ${appName} listening at: %s`, baseUrl);
}
}
let args = port ? [port, onListen] : [onListen];

View File

@ -22,10 +22,9 @@ app.start = function(port) {
database.init();
database.testEmail();
let packageJson = require('../package.json');
console.log(`Web server ${packageJson.name} listening at: ${servicePath}`);
if (config.app.debug) {
let packageJson = require('../package.json');
console.log(`Web server ${packageJson.name} listening at: ${servicePath}`);
console.log(`${packageJson.name} service debug mode enabled`);
}
});

View File

@ -16,10 +16,9 @@ app.start = function(port) {
var servicePath = 'http://' + listener.address().address + ':' + listener.address().port;
database.init();
let packageJson = require('../package.json');
console.log(`Web server ${packageJson.name} listening at: ${servicePath}`);
if (config.app.debug) {
let packageJson = require('../package.json');
console.log(`Web server ${packageJson.name} listening at: ${servicePath}`);
console.log(`${packageJson.name} service debug mode enabled`);
}
});