aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRuben Beltran del Rio <ruben@unlimited.pizza>2021-12-24 13:54:43 +0100
committerRuben Beltran del Rio <ruben@unlimited.pizza>2021-12-24 13:54:43 +0100
commita0666be3ab58ed83ad6d622cfe2b8293c40dffbb (patch)
treee2688587db986a3bc4b040dce1041dac3b352a80 /bin
parentc80b2f4575cfc3d74ec8e0b112943cbd081ffcd7 (diff)
Update code and dpendencies
Diffstat (limited to 'bin')
-rwxr-xr-xbin/tomato_sauce.js40
1 files changed, 20 insertions, 20 deletions
diff --git a/bin/tomato_sauce.js b/bin/tomato_sauce.js
index efe71a3..b8675da 100755
--- a/bin/tomato_sauce.js
+++ b/bin/tomato_sauce.js
@@ -11,9 +11,9 @@ const TomatoSauce = require('..');
const Util = require('../lib/util');
const config = {
- port: Getenv.int('TOMATO_SAUCE_PORT', 9999),
- frequency: Getenv.int('TOMATO_SAUCE_FREQUENCY', 333),
- modulation: Getenv.int('TOMATO_SAUCE_MODULATION_SPEED', 5)
+ port: Getenv.int('TOMATO_SAUCE_PORT', 9999),
+ frequency: Getenv.int('TOMATO_SAUCE_FREQUENCY', 333),
+ modulation: Getenv.int('TOMATO_SAUCE_MODULATION_SPEED', 5)
};
const screenPath = Getenv('TOMATO_SAUCE_SCREEN_PATH', Path.join(__dirname, '../lib/screens'));
@@ -21,28 +21,28 @@ const rendererPath = Getenv('TOMATO_SAUCE_RENDERER_PATH', Path.join(__dirname, '
Util.loadFiles(screenPath).then((screens) => {
- config.screens = screens;
- return Util.loadFiles(rendererPath);
+ config.screens = screens;
+ return Util.loadFiles(rendererPath);
})
- .then((renderers) => {
+ .then((renderers) => {
- config.renderers = renderers;
- })
- .then(() => {
+ config.renderers = renderers;
+ })
+ .then(() => {
- const tomatoSauce = new TomatoSauce(config);
+ const tomatoSauce = new TomatoSauce(config);
- tomatoSauce.on('listening', (event) => {
+ tomatoSauce.on('listening', (event) => {
- const address = event.data.server.address();
- console.log(`Tomato Sauce listening on: ${address.address}:${address.port}`);
- });
+ const address = event.data.server.address();
+ console.log(`Tomato Sauce listening on: ${address.address}:${address.port}`);
+ });
- tomatoSauce.on('error', (error) => {
+ tomatoSauce.on('error', (error) => {
- console.error(error.stack || error.message || error);
- process.exit(1);
- });
+ console.error(error.stack || error.message || error);
+ process.exit(1);
+ });
- tomatoSauce.run();
- });
+ tomatoSauce.run();
+ });