mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
try to fix electron export
This commit is contained in:
parent
c67c08bd69
commit
c0d0a00615
@ -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
2
packages/dbgate/bin/dbgate.js
Normal file → Executable file
@ -2,4 +2,4 @@
|
||||
|
||||
const dbgateApi = require('dbgate-api');
|
||||
|
||||
dbgateApi.mainModule.start('startNodeWeb');
|
||||
dbgateApi.getMainModule().start('startNodeWeb');
|
||||
|
Loading…
Reference in New Issue
Block a user