diff --git a/src/dotnet/APIView/ClientSPA/angular.json b/src/dotnet/APIView/ClientSPA/angular.json index 9060d594abc..ddddc9e3b73 100644 --- a/src/dotnet/APIView/ClientSPA/angular.json +++ b/src/dotnet/APIView/ClientSPA/angular.json @@ -80,11 +80,12 @@ "builder": "@angular-devkit/build-angular:dev-server", "configurations": { "production": { - "browserTarget": "ClientAPP:build:production" + "browserTarget": "ClientAPP:build:production", + "proxyConfig": "src/proxy.conf.json" }, "development": { "browserTarget": "ClientAPP:build:development", - "proxyConfig": "src/proxy.conf.json" + "proxyConfig": "src/development.proxy.conf.json" } }, "defaultConfiguration": "development" diff --git a/src/dotnet/APIView/ClientSPA/package.json b/src/dotnet/APIView/ClientSPA/package.json index f175d4d571e..8bf14b81f6d 100644 --- a/src/dotnet/APIView/ClientSPA/package.json +++ b/src/dotnet/APIView/ClientSPA/package.json @@ -4,7 +4,7 @@ "scripts": { "ng": "ng", "start": "ng serve", - "build": "ng build --output-path=../APIViewWeb/wwwroot/spa --configuration production --base-href https://v2.apiviewuxtest.com/", + "build": "ng build --configuration production", "watch": "ng build --watch --configuration development", "test": "ng test" }, diff --git a/src/dotnet/APIView/ClientSPA/src/development.proxy.conf.json b/src/dotnet/APIView/ClientSPA/src/development.proxy.conf.json new file mode 100644 index 00000000000..4ffd4c55b27 --- /dev/null +++ b/src/dotnet/APIView/ClientSPA/src/development.proxy.conf.json @@ -0,0 +1,6 @@ +{ + "/api": { + "target": "http://localhost:5000", + "secure": false + } +} \ No newline at end of file diff --git a/src/dotnet/APIView/ClientSPA/src/environments/environment.ts b/src/dotnet/APIView/ClientSPA/src/environments/environment.ts index 7786fccc77b..658f0b3060a 100644 --- a/src/dotnet/APIView/ClientSPA/src/environments/environment.ts +++ b/src/dotnet/APIView/ClientSPA/src/environments/environment.ts @@ -1,5 +1,5 @@ export const environment = { production: true, apiUrl: 'api/', - webAppUrl: '' + webAppUrl: 'https://apiviewstaging.azurewebsites.net/' }; diff --git a/src/dotnet/APIView/ClientSPA/src/proxy.conf copy.json b/src/dotnet/APIView/ClientSPA/src/proxy.conf copy.json new file mode 100644 index 00000000000..9590e6d34b3 --- /dev/null +++ b/src/dotnet/APIView/ClientSPA/src/proxy.conf copy.json @@ -0,0 +1,6 @@ +{ + "/api": { + "target": "https://apiviewstaging.azurewebsites.net", + "secure": true + } +} \ No newline at end of file diff --git a/src/dotnet/APIView/ClientSPA/src/proxy.conf.json b/src/dotnet/APIView/ClientSPA/src/proxy.conf.json deleted file mode 100644 index bb5dfe2189d..00000000000 --- a/src/dotnet/APIView/ClientSPA/src/proxy.conf.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "/api": { - "target": "http://localhost:5000", - "secure": false - } - } \ No newline at end of file diff --git a/src/dotnet/APIView/apiview.yml b/src/dotnet/APIView/apiview.yml index 05ad330e0c6..39a058ad284 100644 --- a/src/dotnet/APIView/apiview.yml +++ b/src/dotnet/APIView/apiview.yml @@ -151,11 +151,18 @@ stages: arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)' zipAfterPublish: true + - task: PublishBuildArtifacts@1 + workingDirectory: $(SPAClientProjectDirectory) + inputs: + PathtoPublish: 'dist/client-app' + ArtifactName: 'spa-app' + displayName: 'Publish SPA Artifacts' + - task: PublishBuildArtifacts@1 inputs: pathtoPublish: '$(Build.ArtifactStagingDirectory)' artifactName: 'APIView' - + displayName: 'Publish Web Artifacts' - job: 'Test'