npm build dbgate

This commit is contained in:
Jan Prochazka
2021-02-07 17:24:45 +01:00
parent f3163617e0
commit b60714f30c
9 changed files with 60 additions and 1 deletions

View File

@@ -48,3 +48,38 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm publish
- name: Publish tools
working-directory: packages/tools
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm publish
- name: Publish sqltree
working-directory: packages/sqltree
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm publish
- name: Publish api
working-directory: packages/api
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm publish
- name: Publish web
working-directory: packages/web
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm publish
- name: Publish dbgate
working-directory: packages/dbgate
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm publish

1
packages/api/.npmrc Normal file
View File

@@ -0,0 +1 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}

View File

@@ -8,6 +8,7 @@ const io = require('socket.io');
const fs = require('fs');
const findFreePort = require('find-free-port');
const childProcessChecker = require('./utility/childProcessChecker');
const path = require('path');
const useController = require('./utility/useController');
const socket = require('./utility/socket');
@@ -96,6 +97,14 @@ function start(argument = null) {
process.send({ msgtype: 'listening', port });
});
});
} else if (argument == 'startNodeWeb') {
app.use(express.static(path.join(__dirname, '../../dbgate-web/build')));
findFreePort(5000, function (err, port) {
server.listen(port, () => {
console.log(`DbGate API listening on port ${port}`);
process.send({ msgtype: 'listening', port });
});
});
} else {
server.listen(3000);
}

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env node
const dbgateApi = require('dbgate-api');
dbgateApi.mainModule.start('startNodeWeb');

View File

@@ -9,6 +9,9 @@
"funding": "https://www.paypal.com/paypalme/JanProchazkaCz/30eur",
"author": "Jan Prochazka",
"license": "MIT",
"bin": {
"dbgate": "./bin/dbgate.js"
},
"keywords": [
"sql",
"dbgate",

1
packages/sqltree/.npmrc Normal file
View File

@@ -0,0 +1 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}

1
packages/tools/.npmrc Normal file
View File

@@ -0,0 +1 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}

1
packages/web/.npmrc Normal file
View File

@@ -0,0 +1 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}

View File

@@ -1,7 +1,6 @@
{
"name": "dbgate-web",
"version": "1.0.0",
"private": true,
"dependencies": {
"@ant-design/colors": "^5.0.0",
"@mdi/font": "^5.8.55",
@@ -38,10 +37,14 @@
"styled-components": "^4.4.1",
"uuid": "^3.4.0"
},
"files": [
"build"
],
"scripts": {
"start": "cross-env BROWSER=none PORT=5000 react-scripts start",
"build:docker": "cross-env CI=false REACT_APP_API_URL=ORIGIN react-scripts build",
"build:app": "cross-env PUBLIC_URL=. CI=false react-scripts build",
"build": "cross-env CI=false REACT_APP_API_URL=ORIGIN react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"ts": "tsc"