From 599561466aec4bc441b11516ab2fc02a8f0a952b Mon Sep 17 00:00:00 2001 From: Jane Petrovna Date: Tue, 25 May 2021 23:24:00 -0400 Subject: [PATCH] use fs to parse config instead --- lights.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lights.js b/lights.js index d5a331e..a644d8d 100644 --- a/lights.js +++ b/lights.js @@ -1,6 +1,7 @@ import * as ws281x from 'rpi-ws281x' +import * as fs from 'fs' -const cfg = require('./config.json'); +const cfg = JSON.parse(fs.readFileSync('./config.json')); const fade_ticks = cfg.fade_ticks || 10; var pixels = new Uint32Array(cfg.leds);