25 lines
453 B
JavaScript
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);
|