Adds debugging info to startup log (#225)

There are two ways of setting a configuration for this app: config files, and environment variables. This makes it easy for the app to run with a different config from the one that you intend to run it with.

Currently, only the NODE_ENV variable and server url are being printed out on startup.

This PR adds the database config and the cron config to the details being displayed. This may help debug configuration issues, database issues, and specially making easier to understand what config is being used when for example running in a container.
This commit is contained in:
Jose Bolos
2019-05-15 10:57:08 +01:00
committed by Joey Ciechanowicz
parent ef769d95e1
commit c1dcbf4436

View File

@@ -51,8 +51,10 @@ require('./app')(config, (error, app) => {
console.log('');
console.log(chalk.underline.cyan('Pa11y Webservice started'));
console.log(chalk.grey('mode: %s'), process.env.NODE_ENV);
console.log(chalk.grey('uri: %s'), webservice.server.info.uri);
console.log(chalk.grey('mode: %s'), process.env.NODE_ENV);
console.log(chalk.grey('uri: %s'), webservice.server.info.uri);
console.log(chalk.grey('database: %s'), config.webservice.database);
console.log(chalk.grey('cron: %s'), config.webservice.cron);
});
}