diff --git a/Accounts/nodemon.json b/Accounts/nodemon.json index 28bba6eae6..b0b3948543 100644 --- a/Accounts/nodemon.json +++ b/Accounts/nodemon.json @@ -1,4 +1,4 @@ { "watch": ["webpack.config.js"], - "exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && webpack-dev-server --port=3003 --mode=development" + "exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && echo 'HOST=localhost' >> /usr/src/app/dev-env/.env && echo 'USE_HTTPS=false' >> /usr/src/app/dev-env/.env && webpack-dev-server --port=3003 --mode=development" } \ No newline at end of file diff --git a/AdminDashboard/nodemon.json b/AdminDashboard/nodemon.json index b5823cfbef..4b918aea5d 100644 --- a/AdminDashboard/nodemon.json +++ b/AdminDashboard/nodemon.json @@ -1,4 +1,4 @@ { "watch": ["webpack.config.js"], - "exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && webpack-dev-server --port=3158 --mode=development" + "exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && echo 'HOST=localhost' >> /usr/src/app/dev-env/.env && echo 'USE_HTTPS=false' >> /usr/src/app/dev-env/.env && webpack-dev-server --port=3158 --mode=development" } \ No newline at end of file diff --git a/CommonServer/API/GlobalConfig.ts b/CommonServer/API/GlobalConfigAPI.ts similarity index 95% rename from CommonServer/API/GlobalConfig.ts rename to CommonServer/API/GlobalConfigAPI.ts index e43e45d33e..83ec408b77 100644 --- a/CommonServer/API/GlobalConfig.ts +++ b/CommonServer/API/GlobalConfigAPI.ts @@ -42,7 +42,7 @@ export default class ProbeAPI extends BaseAPI { res, { 'HOST': globalConfig?.host?.toString() || 'localhost', - 'USE_HTTPS': globalConfig?.useHttps || false + 'USE_HTTPS': globalConfig?.useHttps?.toString() || "false" }, ); diff --git a/CommonUI/src/Config.ts b/CommonUI/src/Config.ts index 6bf6368692..f7b0791ac5 100644 --- a/CommonUI/src/Config.ts +++ b/CommonUI/src/Config.ts @@ -30,7 +30,7 @@ export const env: Function = (key: string): string => { }; export const HTTP_PROTOCOL: Protocol = - env('USE_HTTPS') === true ? Protocol.HTTP : Protocol.HTTPS; + env('USE_HTTPS') === "true" ? Protocol.HTTPS : Protocol.HTTP; export const HOST: string = env('HOST') || ''; diff --git a/Dashboard/nodemon.json b/Dashboard/nodemon.json index 10a1c5898a..8dd56cd236 100644 --- a/Dashboard/nodemon.json +++ b/Dashboard/nodemon.json @@ -1,4 +1,4 @@ { "watch": ["webpack.config.js"], - "exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && webpack-dev-server --port=3009 --mode=development" + "exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && echo 'HOST=localhost' >> /usr/src/app/dev-env/.env && echo 'USE_HTTPS=false' >> /usr/src/app/dev-env/.env && webpack-dev-server --port=3009 --mode=development" } \ No newline at end of file diff --git a/Dashboard/webpack.config.js b/Dashboard/webpack.config.js index 1154ebd608..35d25d0a41 100644 --- a/Dashboard/webpack.config.js +++ b/Dashboard/webpack.config.js @@ -7,15 +7,13 @@ const readEnvFile = (pathToFile) => { const parsed = dotenv.config({ path: pathToFile }).parsed; - const env = {}; + const env = { + }; for (const key in parsed) { env[key] = JSON.stringify(parsed[key]); } - env['HOST'] = 'localhost' // use localhost for dev. - env['USE_HTTPS'] = true; - return env; } diff --git a/DashboardAPI/Index.ts b/DashboardAPI/Index.ts index 0ca594e9e4..1d531880ff 100755 --- a/DashboardAPI/Index.ts +++ b/DashboardAPI/Index.ts @@ -19,7 +19,7 @@ import BillingInvoiceAPI from 'CommonServer/API/BillingInvoiceAPI'; import ProjectAPI from 'CommonServer/API/ProjectAPI'; -import GlobalConfigAPI from 'CommonServer/API/GlobalConfig'; +import GlobalConfigAPI from 'CommonServer/API/GlobalConfigAPI'; import ShortLink from 'Model/Models/ShortLink'; import ShortLinkService, { diff --git a/StatusPage/nodemon.json b/StatusPage/nodemon.json index 7891e58b05..12cf7c2529 100644 --- a/StatusPage/nodemon.json +++ b/StatusPage/nodemon.json @@ -1,4 +1,4 @@ { "watch": ["webpack.config.js"], - "exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && webpack-dev-server --port=3105 --mode=development" + "exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && echo 'HOST=localhost' >> /usr/src/app/dev-env/.env && echo 'USE_HTTPS=false' >> /usr/src/app/dev-env/.env && webpack-dev-server --port=3105 --mode=development" } \ No newline at end of file