diff --git a/packages/api/src/main.js b/packages/api/src/main.js index ad77278be..9fb3fbe53 100644 --- a/packages/api/src/main.js +++ b/packages/api/src/main.js @@ -36,6 +36,7 @@ const _ = require('lodash'); const { getLogger } = require('dbgate-tools'); const { getDefaultAuthProvider } = require('./auth/authProvider'); const startCloudUpgradeTimer = require('./utility/cloudUpgrade'); +const { isProApp } = require('./utility/checkLicense'); const logger = getLogger('main'); @@ -77,7 +78,10 @@ function start() { } else if (platformInfo.isAwsUbuntuLayout) { app.use(getExpressPath('/'), express.static('/home/ubuntu/build/public')); } 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) { // console.log('__dirname', __dirname); // console.log(path.join(__dirname, '../../web/public/build')); diff --git a/packages/api/src/utility/checkLicense.js b/packages/api/src/utility/checkLicense.js index a21a66c40..caefc934a 100644 --- a/packages/api/src/utility/checkLicense.js +++ b/packages/api/src/utility/checkLicense.js @@ -12,7 +12,12 @@ function checkLicenseKey(key) { }; } +function isProApp() { + return false; +} + module.exports = { checkLicense, checkLicenseKey, + isProApp, };