guest_worker/scanimation/run.js
Ruben van de Ven 3c6684dfca Add scanimation
2019-12-18 10:48:23 +01:00

25 lines
453 B
JavaScript

const LocalServer = require('./LocalServer')
let config = {
port: 1989,
frontend_folder: 'interfaces',
frames_folder: 'interfaces/frames'
}
let localServer = LocalServer(config)
let run = () => { localServer.start() }
run()
let kill = () => {
console.log('shutting down');
localServer.server.close();
process.exit(0);
}
process.on('SIGHUP', kill);
process.on('SIGINT', kill);
process.on('SIGTERM', kill);
process.on('SIGCONT', kill);