Skip to content

Commit a44128d

Browse files
committed
Fn + SignalR - updates
1 parent d073a68 commit a44128d

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

learn-pr/advocates/automatic-update-of-a-webapp-using-azure-functions-and-signalr/3-exercise-analyze-limitations-of-polling-in-a-web-app.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
prefetch-feature-rollout: true
66
title: Exercise - Analyze the limitations of a polling-based web app
77
description: Review the implementation of polling website and run the app on your machine.
8-
ms.date: 08/12/2024
8+
ms.date: 01/22/2025
99
author: craigshoemaker
1010
ms.author: cshoe
1111
ms.topic: unit

learn-pr/advocates/automatic-update-of-a-webapp-using-azure-functions-and-signalr/5-exercise-enable-automatic-updates-in-a-web-app-using-signalr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
prefetch-feature-rollout: true
66
title: Exercise – Enable automatic updates in a web application using SignalR Service
77
description: Implement integration with Azure Functions and SignalR Service for fast and targeted automatic updates.
8-
ms.date: 08/12/2024
8+
ms.date: 01/22/2025
99
author: craigshoemaker
1010
ms.author: cshoe
1111
ms.topic: unit

learn-pr/advocates/automatic-update-of-a-webapp-using-azure-functions-and-signalr/includes/3-exercise-analyze-limitations-of-polling-in-a-web-app.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ Before you change the prototype, you need to run it to validate the assumptions.
44

55
1. In a separate browser tab or window, fork the sample repository on GitHub with the following link: [mslearn-advocates.azure-functions-and-signalr](https://github.com/MicrosoftDocs/mslearn-advocates.azure-functions-and-signalr/fork). This allows you to push your changes to your own version of the source code. This is a required step in order to deploy the source code to Azure later in the module.
66

7-
1. In the terminal, clone the repository. In the following command, replace `MicrosoftDocs` with your account:
7+
1. In the terminal, clone your forked repository. In the following command, replace `MicrosoftDocs` with your account:
88

99
```bash
10-
git clone https://github.com/MicrosoftDocs/mslearn-advocates.azure-functions-and-signalr stock-prototype
10+
git clone https://github.com/<YOUR-GITHUB-ALIAS>/mslearn-advocates.azure-functions-and-signalr stock-prototype
1111
```
1212

1313
1. Install the dependencies in the **setup-resources** folder.
1414

1515
```bash
16-
cd stock-prototype/setup-resources && npm install
16+
cd setup-resources && npm install
1717
```
1818

1919
If you receive warnings about `EBADENGINE`, you can ignore them.
@@ -81,7 +81,7 @@ Before you change the prototype, you need to run it to validate the assumptions.
8181

8282
1. If you receive a notification about installing the latest Azure Functions Core Tools, select **Install**.
8383

84-
## Get the client and server URLs
84+
## Know the client and server URLs
8585

8686
When running locally, the client and server applications need to know where to find each other. The URLs are:
8787

@@ -152,6 +152,6 @@ BACKEND_URL=http://localhost:7071
152152
153153
:::image type="content" source="../media/visual-studio-code-terminal-output-stock-change.png" alt-text="Screenshot of Visual Studio Code terminal showing console output of the stock price change.":::
154154
155-
1. In both the start-client and start server terminals, stop the applications with <kbd>Ctrl</kbd> + <kbd>C</kbd> or kill the terminal by selecting the trashcan icon.
155+
1. In both the terminals for client and server, stop the applications with <kbd>Ctrl</kbd> + <kbd>C</kbd> or kill the terminal by selecting the trashcan icon.
156156
157157
In this unit, you ran the prototype. While the client does run successfully, it isn't efficient. While each individual client may not notice this with such a small number of stocks, that will change as the number of stocks grows and the number of clients pull from the server. The prototype can be improved. Let's learn how in the next unit.

learn-pr/advocates/automatic-update-of-a-webapp-using-azure-functions-and-signalr/includes/5-exercise-enable-automatic-updates-in-a-web-app-using-signalr.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ You need to create an Azure SignalR resource.
1212
1. Navigate to the `setup-resources` subdirectory to create the resource.
1313

1414
```bash
15-
cd stock-prototype/setup-resources && bash create-signalr-resources.sh & cd ..
15+
cd setup-resources && bash create-signalr-resources.sh & cd ..
1616
```
1717

1818
1. Copy the connection string for the SignalR resource. You'll need this to update the server code.
@@ -97,14 +97,15 @@ Create a function app and related resources in Azure to which you can publish th
9797
9898
| Name | Value |
9999
| -------------------------------------- | ------------------------------ |
100+
| Hosting | Select **Consumption Plan**.|
100101
| Resource group | Create a new resource group names `stock-prototype`.|
101102
| Function App name | Postpend your name to `api`. For example, `api-jamie`.|
102103
| Code or container | Select **code**. |
103104
| Runtime stack | Select **Node.js**. |
104105
| Version | Select an LTS version of Node.js. |
105106
| Region | Select a region close to you. |
106107
| Operating System | Select **Linux**.|
107-
| Hosting | Select **Consumption Plan**.|
108+
108109
109110
1. Don't fill out any other tabs and select **Review + create** then select **Create**. Wait for the deployment to complete before continuing.
110111
1. Select **Go to resource** to open the new function app.
@@ -137,7 +138,8 @@ At this point, your GitHub deployment might generate an error because of a wrong
137138

138139
1. In your new function app page in the Azure portal, select your resource group in **Overview** > **Essentials**, then select the managed identity under **Resources**. This managed identity was created by Functions when you enabled the GitHub deployment.
139140
1. In the **Managed Identity** page, select **Settings** > **Federated credentials** and then select the existing credential.
140-
1. In **Connect your Github account**, change the setting for **Entity** to **Environment** and enter `Production` for **Environment**.
141+
1. In **Connect your Github account**, change these settings:
142+
* **Entity**: from **Branch** to **Environment**
141143
1. Select **Update** to update the credential.
142144
<!--- end removal section -->
143145

@@ -182,7 +184,7 @@ At this point, your GitHub deployment might generate an error because of a wrong
182184

183185
## Configure the environment variables for the API functions
184186

185-
1. In the Azure portal, locate your function app and select **Settings** > **Configuration** then select **New application setting**.
187+
1. In the Azure portal, locate your function app and select **Settings** > **Environment variables** then select **+ Add**.
186188
1. Enter the settings for the Cosmos DB and SignalR connection strings. You can find the values in the `local.settings.json` in the `start/server` folder.
187189

188190
| Name | Value |

0 commit comments

Comments
 (0)