try to fix electron export

This commit is contained in:
Jan Prochazka 2021-02-08 19:21:35 +01:00
parent c67c08bd69
commit c0d0a00615
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,4 @@
const shell = require('./shell');
const main = require('./main');
const argument = process.argv[2];
if (argument && argument.endsWith('Process')) {
@ -8,11 +7,12 @@ if (argument && argument.endsWith('Process')) {
const module = proc[argument];
module.start();
} else if (!module['parent'] && !process.argv.includes('--checkParent')) {
const main = require('./main');
main.start(argument);
}
module.exports = {
...shell,
mainModule: main,
getMainModule: () => require('./main'),
};

2
packages/dbgate/bin/dbgate.js Normal file → Executable file
View File

@ -2,4 +2,4 @@
const dbgateApi = require('dbgate-api');
dbgateApi.mainModule.start('startNodeWeb');
dbgateApi.getMainModule().start('startNodeWeb');