From c1dcbf4436521b19e791b53a21a4b7cd2ff7171f Mon Sep 17 00:00:00 2001 From: Jose Bolos Date: Wed, 15 May 2019 10:57:08 +0100 Subject: [PATCH] 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. --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index e12008f..233eea3 100644 --- a/index.js +++ b/index.js @@ -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); }); }