Allow the webservice to run automatically

This commit is contained in:
Rowan Manning
2013-11-21 09:12:54 +00:00
parent ec9f82aa6f
commit 8f636173a0
5 changed files with 33 additions and 4 deletions

View File

@@ -18,4 +18,14 @@ require('./app')(config, function (err, app) {
console.error(chalk.grey(stack.join('\n')));
});
// Start the webservice if required
if (typeof config.webservice === 'object') {
require('pa11y-webservice')(config.webservice, function (err, webservice) {
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);
});
}
});