diff --git a/ui/angular.json b/ui/angular.json index e01a9f7f..99195200 100644 --- a/ui/angular.json +++ b/ui/angular.json @@ -125,7 +125,13 @@ "development": { "optimization": false, "extractLicenses": false, - "sourceMap": true + "sourceMap": true, + "fileReplacements": [ + { + "replace": "projects/web/src/environments/environment.ts", + "with": "projects/web/src/environments/environment.development.ts" + } + ] } }, "defaultConfiguration": "production" diff --git a/ui/projects/web/environments/environment.prod.ts b/ui/projects/web/environments/environment.prod.ts deleted file mode 100644 index d9f58dea..00000000 --- a/ui/projects/web/environments/environment.prod.ts +++ /dev/null @@ -1,6 +0,0 @@ -export const environment = { - production: true, - debug: false, - wssHost: '/api/socket', - host: '/api', -}; diff --git a/ui/projects/web/environments/environment.ts b/ui/projects/web/environments/environment.ts deleted file mode 100644 index fea1affc..00000000 --- a/ui/projects/web/environments/environment.ts +++ /dev/null @@ -1,19 +0,0 @@ -// This file can be replaced during build by using the `fileReplacements` array. -// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. -// The wallet-trade-list of file replacements can be found in `angular.json`. - -export const environment = { - production: false, - debug: true, - wssHost: '/socket', - host: '/api', -}; - -/* - * For easier debugging in development mode, you can import the following file - * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. - * - * This import should be commented out in production mode because it will have a negative impact - * on performance if an error is thrown. - */ -// import 'zone.js/dist/zone-error'; // Included with Angular CLI. diff --git a/ui/proxy.conf.json b/ui/projects/web/proxy.conf.json similarity index 77% rename from ui/proxy.conf.json rename to ui/projects/web/proxy.conf.json index e6bac3d6..f7488ccd 100644 --- a/ui/proxy.conf.json +++ b/ui/projects/web/proxy.conf.json @@ -1,6 +1,6 @@ { "/api": { - "target": "http://localhost:8081", + "target": "http://localhost:8080", "secure": false, "pathRewrite": { "^/api": "" diff --git a/ui/projects/web/src/core/http.Interceptor.ts b/ui/projects/web/src/core/http.Interceptor.ts index 20828293..50a8bc20 100644 --- a/ui/projects/web/src/core/http.Interceptor.ts +++ b/ui/projects/web/src/core/http.Interceptor.ts @@ -5,7 +5,7 @@ import {AuthService} from './auth.service'; import {LoadingService} from './loading.service'; import {MessageService} from '../shared/message.service'; import {Router} from '@angular/router'; -import {environment} from '../../environments/environment'; +import {environment} from '../environments/environment'; export function defaultInterceptor( req: HttpRequest, diff --git a/ui/projects/web/src/environments/environment.development.ts b/ui/projects/web/src/environments/environment.development.ts new file mode 100644 index 00000000..a86b8e4b --- /dev/null +++ b/ui/projects/web/src/environments/environment.development.ts @@ -0,0 +1,4 @@ +export const environment = { + production: false, + host: '/api', +}; diff --git a/ui/projects/web/src/environments/environment.ts b/ui/projects/web/src/environments/environment.ts new file mode 100644 index 00000000..344b0e35 --- /dev/null +++ b/ui/projects/web/src/environments/environment.ts @@ -0,0 +1,4 @@ +export const environment = { + production: true, + host: '', +};