mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 17:06:01 +00:00
refactor - backend single bundle
This commit is contained in:
@@ -27,7 +27,7 @@ module.exports = {
|
||||
raw: true,
|
||||
},
|
||||
test(req, res) {
|
||||
const subprocess = fork(`${__dirname}/../proc/connectProcess.js`);
|
||||
const subprocess = fork(process.argv[1], ['connectProcess']);
|
||||
subprocess.on('message', resp => res.json(resp));
|
||||
subprocess.send(req.body);
|
||||
},
|
||||
|
||||
@@ -31,7 +31,7 @@ module.exports = {
|
||||
const existing = this.opened.find(x => x.conid == conid && x.database == database);
|
||||
if (existing) return existing;
|
||||
const connection = await connections.get({ conid });
|
||||
const subprocess = fork(`${__dirname}/../proc/databaseConnectionProcess.js`);
|
||||
const subprocess = fork(process.argv[1], ['databaseConnectionProcess']);
|
||||
const newOpened = {
|
||||
conid,
|
||||
database,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user