diff options
| author | Rubén Beltran del Río <ben@nsovocal.com> | 2018-06-26 22:00:10 +0000 |
|---|---|---|
| committer | Rubén Beltran del Río <ben@nsovocal.com> | 2018-06-26 22:00:10 +0000 |
| commit | c80b2f4575cfc3d74ec8e0b112943cbd081ffcd7 (patch) | |
| tree | 4d2c7a991fcc6510431af72225f7cea2c450f86a /bin | |
| parent | be12c97f83026087e0974fc54508b09c3154c9eb (diff) | |
| parent | fd38d4096e65ba5afba8ed1ddc75ed1814ca8c16 (diff) | |
Merge branch 'feature/rbdr-update-docs' into 'master'
Update Documentation
See merge request rbdr/tomato-sauce!1
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/tomato_sauce.js | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/bin/tomato_sauce.js b/bin/tomato_sauce.js index 5a416d5..efe71a3 100755 --- a/bin/tomato_sauce.js +++ b/bin/tomato_sauce.js @@ -19,23 +19,30 @@ const config = { const screenPath = Getenv('TOMATO_SAUCE_SCREEN_PATH', Path.join(__dirname, '../lib/screens')); const rendererPath = Getenv('TOMATO_SAUCE_RENDERER_PATH', Path.join(__dirname, '../lib/renderers')); -Util.loadFiles(screenPath).then(function (screens) { +Util.loadFiles(screenPath).then((screens) => { + config.screens = screens; return Util.loadFiles(rendererPath); -}).then(function (renderers) { - config.renderers = renderers; -}).then(function () { - let tomatoSauce = new TomatoSauce(config); +}) + .then((renderers) => { - tomatoSauce.on('listening', function (event) { - const address = event.data.server.address(); - console.log(`Tomato Sauce listening on: ${address.address}:${address.port}`); - }); + config.renderers = renderers; + }) + .then(() => { - tomatoSauce.on('error', function (error) { - console.error(error.stack || error.message || error); - process.exit(1); - }); + const tomatoSauce = new TomatoSauce(config); + + tomatoSauce.on('listening', (event) => { - tomatoSauce.run(); -}); + const address = event.data.server.address(); + console.log(`Tomato Sauce listening on: ${address.address}:${address.port}`); + }); + + tomatoSauce.on('error', (error) => { + + console.error(error.stack || error.message || error); + process.exit(1); + }); + + tomatoSauce.run(); + }); |