mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-27 14:56:00 +00:00
dbgate package
This commit is contained in:
24
app/README.md
Normal file
24
app/README.md
Normal file
@@ -0,0 +1,24 @@
|
||||
[](https://github.com/prettier/prettier)
|
||||
[](https://paypal.me/JanProchazkaCz/30eur)
|
||||
[](https://www.npmjs.com/package/dbgate)
|
||||
|
||||
# DbGate - database administration tool
|
||||
|
||||
DbGate is fast and easy to use database administration tool for MySQL, PostgreSQL, SQL Server.
|
||||
|
||||
## Install using npm
|
||||
```sh
|
||||
npm install -g dbgate
|
||||
```
|
||||
|
||||
Then run <code>dbgate</code> from commandline.
|
||||
|
||||
You can also download binary packages from https://dbgate.org
|
||||
|
||||
## Other dbgate packages
|
||||
You can use some functionality of dbgate from your JavaScript code. See [dbgate-api](https://npmjs.com/dbgate-api) package.
|
||||
|
||||
## Screenshot
|
||||
|
||||

|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/dbshell/dbgate.git"
|
||||
"url": "https://github.com/dbgate/dbgate.git"
|
||||
},
|
||||
"build": {
|
||||
"appId": "org.dbgate",
|
||||
@@ -58,12 +58,16 @@
|
||||
"scripts": {
|
||||
"start": "cross-env ELECTRON_START_URL=http://localhost:5000 electron .",
|
||||
"start:local": "cross-env electron .",
|
||||
"start:dbgate": "dbgate",
|
||||
"dist": "electron-builder",
|
||||
"build": "cd ../packages/api && yarn build && cd ../web && yarn build:app && cd ../../app && yarn dist",
|
||||
"build:local": "cd ../packages/api && yarn build && cd ../web && yarn build:app && cd ../../app && yarn predist",
|
||||
"postinstall": "electron-builder install-app-deps",
|
||||
"predist": "copyfiles ../packages/api/dist/* packages && copyfiles \"../packages/web/build/*\" packages && copyfiles \"../packages/web/build/**/*\" packages"
|
||||
},
|
||||
"bin": {
|
||||
"dbgate": "./src/dbgate"
|
||||
},
|
||||
"main": "src/electron.js",
|
||||
"devDependencies": {
|
||||
"copyfiles": "^2.2.0",
|
||||
|
||||
25
app/src/dbgate.js
Normal file
25
app/src/dbgate.js
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
var electron = require('electron');
|
||||
|
||||
var proc = require('child_process');
|
||||
|
||||
var child = proc.spawn(electron, ['.'], { stdio: 'inherit', windowsHide: false });
|
||||
child.on('close', function (code, signal) {
|
||||
if (code === null) {
|
||||
console.error(electron, 'exited with signal', signal);
|
||||
process.exit(1);
|
||||
}
|
||||
process.exit(code);
|
||||
});
|
||||
|
||||
const handleTerminationSignal = function (signal) {
|
||||
process.on(signal, function signalHandler() {
|
||||
if (!child.killed) {
|
||||
child.kill(signal);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
handleTerminationSignal('SIGINT');
|
||||
handleTerminationSignal('SIGTERM');
|
||||
Reference in New Issue
Block a user