replaced executeJavaScript with IPC event

This commit is contained in:
Jan Prochazka
2021-12-25 11:29:46 +01:00
parent 0e95082be6
commit ab4aef6c7e
5 changed files with 11 additions and 73 deletions

View File

@@ -121,19 +121,7 @@ function start() {
}
}
if (processArgs.dynport) {
childProcessChecker();
authorization = crypto.randomBytes(32).toString('hex');
getPort().then(port => {
checkLocalhostOrigin = `localhost:${port}`;
server.listen(port, () => {
console.log(`DbGate API listening on port ${port}`);
process.send({ msgtype: 'listening', port, authorization });
});
});
} else if (platformInfo.isNpmDist) {
if (platformInfo.isNpmDist) {
app.use(express.static(path.join(__dirname, '../../dbgate-web/public')));
getPort({ port: 5000 }).then(port => {
server.listen(port, () => {
@@ -141,7 +129,7 @@ function start() {
});
});
} else {
server.listen(3000);
server.listen(process.env.PORT || 3000);
}
}