fix import error

This commit is contained in:
jane 2021-05-26 18:29:24 -04:00
parent caf87bb36d
commit 5e1c369c34
2 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,6 @@
import * as server from './server.js'; import * as server from './server.js';
import * as lights from './lights.js'; import * as lights from './lights.js';
import * as fs from 'fs';
const cfg = JSON.parse(fs.readFileSync('./config.json')); const cfg = JSON.parse(fs.readFileSync('./config.json'));

View File

@ -1,6 +1,6 @@
import ws281x from 'rpi-ws281x' import ws281x from 'rpi-ws281x';
import * as fs from 'fs' import * as fs from 'fs';
import Logger, { levels } from './logger.js' import Logger, { levels } from './logger.js';
const cfg = JSON.parse(fs.readFileSync('./config.json')); const cfg = JSON.parse(fs.readFileSync('./config.json'));
const log = new Logger("lights", cfg.log_level ? levels[cfg.log_level] : levels.INFO); const log = new Logger("lights", cfg.log_level ? levels[cfg.log_level] : levels.INFO);