You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Tutorial: Create a serverless real-time chat app with Azure Functions and Azure Web PubSub service
@@ -24,11 +24,22 @@ In this tutorial, you learn how to:
24
24
25
25
## Prerequisites
26
26
27
-
# [JavaScript](#tab/javascript)
27
+
# [JavaScript Model v4](#tab/javascript-v4)
28
28
29
29
- A code editor, such as [Visual Studio Code](https://code.visualstudio.com/)
30
30
31
-
-[Node.js](https://nodejs.org/en/download/), version 10.x.
31
+
-[Node.js](https://nodejs.org/en/download/), version 18.x or above.
32
+
> [!NOTE]
33
+
> For more information about the supported versions of Node.js, see [Azure Functions runtime versions documentation](../azure-functions/functions-versions.md#languages).
34
+
-[Azure Functions Core Tools](https://github.com/Azure/azure-functions-core-tools#installing) (v4 or higher preferred) to run Azure Function apps locally and deploy to Azure.
35
+
36
+
- The [Azure CLI](/cli/azure) to manage Azure resources.
37
+
38
+
# [JavaScript Model v3](#tab/javascript-v3)
39
+
40
+
- A code editor, such as [Visual Studio Code](https://code.visualstudio.com/)
41
+
42
+
-[Node.js](https://nodejs.org/en/download/), version 18.x or above.
32
43
> [!NOTE]
33
44
> For more information about the supported versions of Node.js, see [Azure Functions runtime versions documentation](../azure-functions/functions-versions.md#languages).
34
45
-[Azure Functions Core Tools](https://github.com/Azure/azure-functions-core-tools#installing) (v4 or higher preferred) to run Azure Function apps locally and deploy to Azure.
@@ -61,10 +72,16 @@ In this tutorial, you learn how to:
61
72
62
73
1. Make sure you have [Azure Functions Core Tools](https://github.com/Azure/azure-functions-core-tools#installing) installed. And then create an empty directory for the project. Run command under this working directory.
63
74
64
-
# [JavaScript](#tab/javascript)
75
+
# [JavaScript Model v4](#tab/javascript-v4)
76
+
77
+
```bash
78
+
func init --worker-runtime javascript --model V4
79
+
```
80
+
81
+
# [JavaScript Model v3](#tab/javascript-v3)
65
82
66
83
```bash
67
-
func init --worker-runtime javascript
84
+
func init --worker-runtime javascript --model V3
68
85
```
69
86
70
87
# [C# in-process](#tab/csharp-in-process)
@@ -81,13 +98,25 @@ In this tutorial, you learn how to:
- Update `index/function.json` and copy following json codes.
119
176
```json
@@ -205,7 +262,30 @@ In this tutorial, you learn how to:
205
262
> [!NOTE]
206
263
> In this sample, we use [Microsoft Entra ID](../app-service/configure-authentication-user-identities.md) user identity header `x-ms-client-principal-name` to retrieve `userId`. And this won't work in a local function. You can make it empty or change to other ways to get or generate `userId` when playing in local. For example, let client type a user name and pass it in query like `?user={$username}` when call `negotiate` function to get service connection url. And in the `negotiate` function, set `userId` with value `{query.user}`.
207
264
208
-
# [JavaScript](#tab/javascript)
265
+
# [JavaScript Model v4](#tab/javascript-v4)
266
+
- Update `src/functions/negotiate` and copy following codes.
> Check [Azure Functions runtime versions documentation](../azure-functions/functions-versions.md#languages) to set `--runtime-version` parameter to supported value.
0 commit comments