mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-28 06:06:00 +00:00
web can be run from dbgate package
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "dbgate-api",
|
"name": "dbgate-api",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"version": "3.9.6-alpha.8",
|
"version": "3.9.6-alpha.9",
|
||||||
"homepage": "https://dbgate.org/",
|
"homepage": "https://dbgate.org/",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -26,8 +26,8 @@
|
|||||||
"compare-versions": "^3.6.0",
|
"compare-versions": "^3.6.0",
|
||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"cross-env": "^6.0.3",
|
"cross-env": "^6.0.3",
|
||||||
"dbgate-sqltree": "^3.9.6-alpha.8",
|
"dbgate-sqltree": "^3.9.6-alpha.9",
|
||||||
"dbgate-tools": "^3.9.6-alpha.8",
|
"dbgate-tools": "^3.9.6-alpha.9",
|
||||||
"eslint": "^6.8.0",
|
"eslint": "^6.8.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"express-basic-auth": "^1.2.0",
|
"express-basic-auth": "^1.2.0",
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/lodash": "^4.14.149",
|
"@types/lodash": "^4.14.149",
|
||||||
"dbgate-types": "^3.9.6-alpha.8",
|
"dbgate-types": "^3.9.6-alpha.9",
|
||||||
"env-cmd": "^10.1.0",
|
"env-cmd": "^10.1.0",
|
||||||
"node-loader": "^1.0.2",
|
"node-loader": "^1.0.2",
|
||||||
"nodemon": "^2.0.2",
|
"nodemon": "^2.0.2",
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
const shell = require('./shell');
|
const shell = require('./shell');
|
||||||
// require('socket.io-client');
|
const main = require('./main');
|
||||||
|
|
||||||
// "socket.io-client": "^2.3.0",
|
|
||||||
// "utf-8-validate": "^5.0.2",
|
|
||||||
// "uuid": "^3.4.0",
|
|
||||||
// "uws": "10.148.1"
|
|
||||||
|
|
||||||
const argument = process.argv[2];
|
const argument = process.argv[2];
|
||||||
if (argument && argument.endsWith('Process')) {
|
if (argument && argument.endsWith('Process')) {
|
||||||
@@ -13,7 +8,6 @@ if (argument && argument.endsWith('Process')) {
|
|||||||
const module = proc[argument];
|
const module = proc[argument];
|
||||||
module.start();
|
module.start();
|
||||||
} else if (!module['parent'] && !process.argv.includes('--checkParent')) {
|
} else if (!module['parent'] && !process.argv.includes('--checkParent')) {
|
||||||
const main = require('./main');
|
|
||||||
|
|
||||||
main.start(argument);
|
main.start(argument);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,9 +83,11 @@ function start(argument = null) {
|
|||||||
// server static files inside docker container
|
// server static files inside docker container
|
||||||
app.use(express.static('/home/dbgate-docker/build'));
|
app.use(express.static('/home/dbgate-docker/build'));
|
||||||
} else {
|
} else {
|
||||||
app.get('/', (req, res) => {
|
if (argument != 'startNodeWeb') {
|
||||||
res.send('DbGate API');
|
app.get('/', (req, res) => {
|
||||||
});
|
res.send('DbGate API');
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argument == '--dynport') {
|
if (argument == '--dynport') {
|
||||||
@@ -102,7 +104,6 @@ function start(argument = null) {
|
|||||||
findFreePort(5000, function (err, port) {
|
findFreePort(5000, function (err, port) {
|
||||||
server.listen(port, () => {
|
server.listen(port, () => {
|
||||||
console.log(`DbGate API listening on port ${port}`);
|
console.log(`DbGate API listening on port ${port}`);
|
||||||
process.send({ msgtype: 'listening', port });
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user