Skip to content

Commit 4eb3931

Browse files
Merge pull request #11 from Stewartarmbrecht/fix404
Fix 404 for Web App After Deployment
2 parents 618548f + 926a73b commit 4eb3931

File tree

5 files changed

+26
-8
lines changed

5 files changed

+26
-8
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,3 +290,11 @@ __pycache__/
290290
*.xsd.cs
291291
src/Web/content-reactor/wwwroot/dist/bundle.js
292292
/web/src/signalr-web/SignalRMiddleware/EventApp/.vscode/launch.json
293+
/.azure
294+
/.config/configstore
295+
/proxy/proxies/proxies.zip
296+
/.nuget/NuGet
297+
/.npm
298+
/.node-gyp/8.11.3
299+
/.dotnet
300+
/web/src/signalr-web/SignalRMiddleware/SignalRMiddleware/wwwroot

setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ The web app is deployed into its own resource group. It has its own ARM template
354354

355355
2. **Deploy ARM Template:** Use the _Azure Resource Group Deployment_ task, with the _Action_ set to `Create or update resource group`. Set the _Template_ to the location of the `template.json` file, e.g. `$(System.DefaultWorkingDirectory)/web/deploy/template.json`. Set the _Overridable template parameters_ to the following: `-functionAppProxyName {function-app-proxy-name}`
356356

357-
3. **Deploy API:** Use the _Azure App Service Deploy_ task, with the _App type_ set to `Function app`. Set the _App Service name_ to `contentreactor$(UniqueResourceNameSuffix)`. Set the _Package or folder_ to the relative location of the `.zip` file for the front-end API, e.g. `$(System.DefaultWorkingDirectory)/Web-CI/webapp/*.zip`.
357+
3. **Deploy API:** Use the _Azure App Service Deploy_ task, with the _App type_ set to `Web App`. Set the _App Service name_ to `crweb$(UniqueResourceNameSuffix)`. Set the _Package or folder_ to the relative location of the `.zip` file for the front-end API, e.g. `$(System.DefaultWorkingDirectory)/Web-CI/webapp/*.zip`.
358358

359359
4. **Deploy Event Subscriptions ARM Template:** Use the _Azure Resource Group Deployment_ task, with the _Action_ set to `Create or update resource group`. Set the _Template_ to the location of the `eventGridSubscriptions.json` file, e.g. `$(System.DefaultWorkingDirectory)/web/deploy/eventGridSubscriptions.json`. Set the _Overridable template parameters_ to the following: `eventGridTopicName={event-grid-topic-name} appServiceName={app-service-name}`
360360

@@ -374,4 +374,4 @@ The web app is deployed into its own resource group. It has its own ARM template
374374

375375
3. Deploy the Event Grid subscription ARM Template:
376376

377-
`az group deployment create -g ContentReactor-Events --template-file web/deploy/eventGridSubscriptions.json --parameters eventGridTopicName={event-grid-topic-name} appServiceName={app-service-name}`
377+
`az group deployment create -g ContentReactor-Events --template-file web/deploy/eventGridSubscriptions.json --parameters eventGridTopicName={event-grid-topic-name} appServiceName={app-service-name}`

web/build/build.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,25 @@
33
resources:
44
- repo: self
55
queue:
6-
name: ContentReactor-Web-CI
76
demands:
87
- npm
98
- msbuild
109

1110
steps:
1211

13-
# Build Angular App
12+
# Install Angular App Dependencies
1413
- task: Npm@1
14+
name: InstallNpmPackages
15+
displayName: Install Angular App Dependencies
1516
inputs:
17+
command: install
1618
workingDir: 'web/src/signalr-web/SignalRMiddleware/EventApp'
17-
verbose: false
19+
verbose: true
20+
21+
# Package Angular App
22+
- script: npm run dist
23+
displayName: Package Angular App
24+
workingDirectory: 'web/src/signalr-web/SignalRMiddleware/EventApp'
1825

1926
# Build the SignalR ASP.NET WebApp
2027
- task: DotNetCoreCLI@2
@@ -43,4 +50,4 @@ steps:
4350
inputs:
4451
pathToPublish: web/deploy
4552
artifactName: deploy
46-
artifactType: container
53+
artifactType: container

web/src/signalr-web/SignalRMiddleware/EventApp/src/app/components/items/item.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ export class ItemComponent {
562562

563563
}
564564

565-
openSubmitTextModal(content,textId:string) {
565+
openSubmitTextModal(content) {
566566
this.inputText = ""
567567
this.modalService.open(content).result.then((result) => {
568568
this.closeResult = `Closed with: ${result}`;
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
export const environment = {
2-
production: true
2+
production: true,
3+
appInsights: {
4+
instrumentationKey: "%INSTRUMENTATION_KEY%"
5+
}
36
};

0 commit comments

Comments
 (0)