diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-08-25 12:33:03 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-08-25 12:33:03 +0200 |
| commit | 8ff1162897acc9a393f41edf9faf5593d6c66995 (patch) | |
| tree | b93e52d0b0c36a84b29fe0e5dde3d7401ec130eb /bin | |
| parent | 3ec8e14833b55d6bff4cf5702f90e1bb9a1b1e40 (diff) | |
Replace JS with rust
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/tomato_sauce.js | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/bin/tomato_sauce.js b/bin/tomato_sauce.js deleted file mode 100755 index 524c361..0000000 --- a/bin/tomato_sauce.js +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env node - -'use strict'; - -/* eslint no-console: 0 */ - -const Path = require('path'); -const Getenv = require('getenv'); - -const TomatoSauce = require('..'); -const Util = require('../lib/util'); - -const config = { - port: Getenv.int('TOMATO_SAUCE_PORT', 7777), - 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')); -const rendererPath = Getenv('TOMATO_SAUCE_RENDERER_PATH', Path.join(__dirname, '../lib/renderers')); - -Util.loadFiles(screenPath).then((screens) => { - - config.screens = screens; - return Util.loadFiles(rendererPath); -}) - .then((renderers) => { - - config.renderers = renderers; - }) - .then(() => { - - const tomatoSauce = new TomatoSauce(config); - - tomatoSauce.on('listening', (event) => { - - 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(); - }); |