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,15 +36,17 @@ 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');
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];
return app.listen.apply(app, args);

View File

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