15 lines
272 B
JavaScript
15 lines
272 B
JavaScript
import * as server from './server.js';
|
|
import * as lights from './lights.js';
|
|
|
|
const cfg = require('./config.json');
|
|
|
|
global.cfg = cfg;
|
|
|
|
server.recv(
|
|
(res) => {
|
|
lights.set_pattern(JSON.parse(res));
|
|
},
|
|
(res) => {
|
|
console.log(`error callback: ${res}`);
|
|
}
|
|
);
|