This commit is contained in:
SPRINX0\prochazka
2024-11-14 10:10:15 +01:00
parent 2784053b83
commit e379be0107
2 changed files with 10 additions and 1 deletions

View File

@@ -36,6 +36,7 @@ const _ = require('lodash');
const { getLogger } = require('dbgate-tools'); const { getLogger } = require('dbgate-tools');
const { getDefaultAuthProvider } = require('./auth/authProvider'); const { getDefaultAuthProvider } = require('./auth/authProvider');
const startCloudUpgradeTimer = require('./utility/cloudUpgrade'); const startCloudUpgradeTimer = require('./utility/cloudUpgrade');
const { isProApp } = require('./utility/checkLicense');
const logger = getLogger('main'); const logger = getLogger('main');
@@ -77,7 +78,10 @@ function start() {
} else if (platformInfo.isAwsUbuntuLayout) { } else if (platformInfo.isAwsUbuntuLayout) {
app.use(getExpressPath('/'), express.static('/home/ubuntu/build/public')); app.use(getExpressPath('/'), express.static('/home/ubuntu/build/public'));
} else if (platformInfo.isNpmDist) { } else if (platformInfo.isNpmDist) {
app.use(getExpressPath('/'), express.static(path.join(__dirname, '../../dbgate-web/public'))); app.use(
getExpressPath('/'),
express.static(path.join(__dirname, isProApp() ? '../../dbgate-web-premium/public' : '../../dbgate-web/public'))
);
} else if (process.env.DEVWEB) { } else if (process.env.DEVWEB) {
// console.log('__dirname', __dirname); // console.log('__dirname', __dirname);
// console.log(path.join(__dirname, '../../web/public/build')); // console.log(path.join(__dirname, '../../web/public/build'));

View File

@@ -12,7 +12,12 @@ function checkLicenseKey(key) {
}; };
} }
function isProApp() {
return false;
}
module.exports = { module.exports = {
checkLicense, checkLicense,
checkLicenseKey, checkLicenseKey,
isProApp,
}; };