guest_worker/scanimation/run.js

26 lines
453 B
JavaScript
Raw Normal View History

2019-12-18 10:48:23 +01:00
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);