mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 00:56:02 +00:00
explicit start api
This commit is contained in:
@@ -8,4 +8,4 @@ then
|
|||||||
echo "$HOST_IP $HOST_DOMAIN" >> /etc/hosts
|
echo "$HOST_IP $HOST_DOMAIN" >> /etc/hosts
|
||||||
fi
|
fi
|
||||||
|
|
||||||
node bundle.js
|
node bundle.js --start-api
|
||||||
|
|||||||
@@ -52,11 +52,11 @@
|
|||||||
"uuid": "^3.4.0"
|
"uuid": "^3.4.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "env-cmd node src/index.js",
|
"start": "env-cmd node src/index.js --start-api",
|
||||||
"start:portal": "env-cmd -f env/portal/.env node src/index.js",
|
"start:portal": "env-cmd -f env/portal/.env node src/index.js --start-api",
|
||||||
"start:singledb": "env-cmd -f env/singledb/.env node src/index.js",
|
"start:singledb": "env-cmd -f env/singledb/.env node src/index.js --start-api",
|
||||||
"start:filedb": "env-cmd node src/index.js /home/jena/test/chinook/Chinook.db",
|
"start:filedb": "env-cmd node src/index.js /home/jena/test/chinook/Chinook.db --start-api",
|
||||||
"start:singleconn": "env-cmd node src/index.js --server localhost --user root --port 3307 --engine mysql@dbgate-plugin-mysql --password test",
|
"start:singleconn": "env-cmd node src/index.js --server localhost --user root --port 3307 --engine mysql@dbgate-plugin-mysql --password test --start-api",
|
||||||
"ts": "tsc",
|
"ts": "tsc",
|
||||||
"build": "webpack"
|
"build": "webpack"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,9 +8,10 @@ if (processArgs.startProcess) {
|
|||||||
const proc = require('./proc');
|
const proc = require('./proc');
|
||||||
const module = proc[processArgs.startProcess];
|
const module = proc[processArgs.startProcess];
|
||||||
module.start();
|
module.start();
|
||||||
} else if (!processArgs.checkParent && !global['API_PACKAGE']) {
|
}
|
||||||
const main = require('./main');
|
|
||||||
|
|
||||||
|
if (processArgs.startApi) {
|
||||||
|
const main = require('./main');
|
||||||
main.start();
|
main.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ const startProcess = getNamedArg('--start-process');
|
|||||||
const isForkedApi = process.argv.includes('--is-forked-api');
|
const isForkedApi = process.argv.includes('--is-forked-api');
|
||||||
const pluginsDir = getNamedArg('--plugins-dir');
|
const pluginsDir = getNamedArg('--plugins-dir');
|
||||||
const workspaceDir = getNamedArg('--workspace-dir');
|
const workspaceDir = getNamedArg('--workspace-dir');
|
||||||
|
const startApi = process.argv.includes('--start-api');
|
||||||
|
|
||||||
function getPassArgs() {
|
function getPassArgs() {
|
||||||
const res = [];
|
const res = [];
|
||||||
@@ -30,4 +31,5 @@ module.exports = {
|
|||||||
getPassArgs,
|
getPassArgs,
|
||||||
pluginsDir,
|
pluginsDir,
|
||||||
workspaceDir,
|
workspaceDir,
|
||||||
|
startApi,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user