refactor - backend single bundle

This commit is contained in:
Jan Prochazka
2020-03-14 10:22:10 +01:00
parent 6a13d9fa19
commit cd58555409
10 changed files with 98 additions and 68 deletions

View File

@@ -1,4 +1,3 @@
const connections = require('./connections');
const socket = require('../utility/socket');
const { fork } = require('child_process');
@@ -20,7 +19,7 @@ module.exports = {
const existing = this.opened.find(x => x.conid == conid);
if (existing) return existing;
const connection = await connections.get({ conid });
const subprocess = fork(`${__dirname}/../proc/serverConnectionProcess.js`);
const subprocess = fork(process.argv[1], ['serverConnectionProcess']);
const newOpened = {
conid,
subprocess,