Files
dougal-software/lib/www/server/index.js

19 lines
447 B
JavaScript
Raw Normal View History

#!/usr/bin/node
2020-08-08 23:59:13 +02:00
const api = require('./api');
const ws = require('./ws');
const { fork } = require('child_process');
// const em = require('./events');
2020-08-08 23:59:13 +02:00
const server = api.start(process.env.HTTP_PORT || 3000, process.env.HTTP_PATH);
ws.start(server);
const eventManagerPath = [__dirname, "events"].join("/");
const eventManager = fork(eventManagerPath, /*{ stdio: 'ignore' }*/);
process.on('exit', () => eventManager.kill());
// em.start();