From f9437c1f5d965013b345afe68dc890a8f8b40f26 Mon Sep 17 00:00:00 2001 From: Vitor Hideyoshi Date: Wed, 11 Oct 2023 21:18:31 -0300 Subject: [PATCH] Fixes Env Variables --- angular.json | 10 ---------- src/assets/env.sample.js | 4 ++-- src/environments/environment.prod.ts | 4 ++-- src/index.html | 2 +- src/proxy.conf.json | 7 ------- 5 files changed, 5 insertions(+), 22 deletions(-) delete mode 100644 src/proxy.conf.json diff --git a/angular.json b/angular.json index edc6b43..26d1d85 100644 --- a/angular.json +++ b/angular.json @@ -79,16 +79,6 @@ "options": { "browserTarget": "frontend-hideyoshi.com:build:build" }, - "configurations": { - "production": { - "browserTarget": "frontend-hideyoshi.com:build:production", - "proxyConfig": "src/proxy.conf.json" - }, - "development": { - "browserTarget": "frontend-hideyoshi.com:build:development", - "proxyConfig": "src/proxy.conf.json" - } - }, "defaultConfiguration": "development" }, "extract-i18n": { diff --git a/src/assets/env.sample.js b/src/assets/env.sample.js index 66c485f..e3d573f 100644 --- a/src/assets/env.sample.js +++ b/src/assets/env.sample.js @@ -2,6 +2,6 @@ window['env'] = window['env'] || {}; // Environment variables - window['env']['backendPath'] = '${BACKEND_URL}'; - window['env']['backendOAuthPath'] = '${BACKEND_OAUTH_URL}'; + window['env']['BACKEND_URL'] = '${BACKEND_URL}'; + window['env']['BACKEND_OAUTH_URL'] = '${BACKEND_OAUTH_URL}'; })(this); diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 2d5d4b6..ef04952 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,5 +1,5 @@ export const environment = { production: true, - backendPath: (window).env['BACKEND_URL'], - backendOAuthPath: (window).env['BACKEND_OAUTH_URL'] + backendPath: (window)['env']['BACKEND_URL'], + backendOAuthPath: (window)['env']['BACKEND_OAUTH_URL'] }; diff --git a/src/index.html b/src/index.html index 3cf937e..1fbd79b 100644 --- a/src/index.html +++ b/src/index.html @@ -21,7 +21,7 @@ - + diff --git a/src/proxy.conf.json b/src/proxy.conf.json deleted file mode 100644 index 2706673..0000000 --- a/src/proxy.conf.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "/api": { - "target": "http://localhost:8070", - "secure": false, - "pathRewrite": {"^/api" : ""} - } -} \ No newline at end of file