Skip to content

Commit 67ad905

Browse files
committed
Move Node.js EnableWorkerIndexing section
1 parent 54b6bb5 commit 67ad905

File tree

3 files changed

+36
-36
lines changed

3 files changed

+36
-36
lines changed

articles/azure-functions/functions-node-upgrade-v4.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,40 @@ Version 4 of the Node.js programming model requires the following minimum versio
2929
- [Azure Functions Runtime](./functions-versions.md) v4.16+
3030
- [Azure Functions Core Tools](./functions-run-local.md) v4.0.4915+ (if running locally)
3131

32+
## Enable v4 programming model
33+
34+
The following application setting is required to run the v4 programming model while it is in preview:
35+
- Name: `AzureWebJobsFeatureFlags`
36+
- Value: `EnableWorkerIndexing`
37+
38+
If you're running locally using [Azure Functions Core Tools](functions-run-local.md), you should add this setting to your `local.settings.json` file. If you're running in Azure, follow these steps with the tool of your choice:
39+
40+
# [Azure CLI](#tab/azure-cli-set-indexing-flag)
41+
42+
Replace `<FUNCTION_APP_NAME>` and `<RESOURCE_GROUP_NAME>` with the name of your function app and resource group, respectively.
43+
44+
```azurecli
45+
az functionapp config appsettings set --name <FUNCTION_APP_NAME> --resource-group <RESOURCE_GROUP_NAME> --settings AzureWebJobsFeatureFlags=EnableWorkerIndexing
46+
```
47+
48+
# [Azure PowerShell](#tab/azure-powershell-set-indexing-flag)
49+
50+
Replace `<FUNCTION_APP_NAME>` and `<RESOURCE_GROUP_NAME>` with the name of your function app and resource group, respectively.
51+
52+
```azurepowershell
53+
Update-AzFunctionAppSetting -Name <FUNCTION_APP_NAME> -ResourceGroupName <RESOURCE_GROUP_NAME> -AppSetting @{"AzureWebJobsFeatureFlags" = "EnableWorkerIndexing"}
54+
```
55+
56+
# [VS Code](#tab/vs-code-set-indexing-flag)
57+
58+
1. Make sure you have the [Azure Functions extension for VS Code](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions) installed
59+
1. Press <kbd>F1</kbd> to open the command palette. In the command palette, search for and select `Azure Functions: Add New Setting...`.
60+
1. Choose your subscription and function app when prompted
61+
1. For the name, type `AzureWebJobsFeatureFlags` and press <kbd>Enter</kbd>.
62+
1. For the value, type `EnableWorkerIndexing` and press <kbd>Enter</kbd>.
63+
64+
---
65+
3266
## Include the npm package
3367

3468
For the first time, the [`@azure/functions`](https://www.npmjs.com/package/@azure/functions) npm package contains the primary source code that backs the Node.js programming model. In previous versions, that code shipped directly in Azure and the npm package only had the TypeScript types. Moving forward, you need to include this package for both TypeScript and JavaScript apps. You _can_ include the package for existing v3 apps, but it isn't required.
@@ -327,6 +361,6 @@ The http request and response types are now a subset of the [fetch standard](htt
327361
328362
## Troubleshooting
329363
330-
If you see the following error, make sure you [set the `EnableWorkerIndexing` flag](./functions-reference-node.md#enable-v4-programming-model) and you're using the minimum version of all [requirements](#requirements):
364+
If you see the following error, make sure you [set the `EnableWorkerIndexing` flag](#enable-v4-programming-model) and you're using the minimum version of all [requirements](#requirements):
331365
332366
> No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).

articles/azure-functions/functions-reference-node.md

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -68,40 +68,6 @@ At the root of the project, there's a shared [host.json](functions-host-json.md)
6868

6969
::: zone pivot="nodejs-model-v4"
7070

71-
## Enable v4 programming model
72-
73-
The following application setting is required to run the v4 programming model while it is in preview:
74-
- Name: `AzureWebJobsFeatureFlags`
75-
- Value: `EnableWorkerIndexing`
76-
77-
If you're running locally using [Azure Functions Core Tools](functions-run-local.md), you should add this setting to your `local.settings.json` file. If you're running in Azure, follow these steps with the tool of your choice:
78-
79-
# [Azure CLI](#tab/azure-cli-set-indexing-flag)
80-
81-
Replace `<FUNCTION_APP_NAME>` and `<RESOURCE_GROUP_NAME>` with the name of your function app and resource group, respectively.
82-
83-
```azurecli
84-
az functionapp config appsettings set --name <FUNCTION_APP_NAME> --resource-group <RESOURCE_GROUP_NAME> --settings AzureWebJobsFeatureFlags=EnableWorkerIndexing
85-
```
86-
87-
# [Azure PowerShell](#tab/azure-powershell-set-indexing-flag)
88-
89-
Replace `<FUNCTION_APP_NAME>` and `<RESOURCE_GROUP_NAME>` with the name of your function app and resource group, respectively.
90-
91-
```azurepowershell
92-
Update-AzFunctionAppSetting -Name <FUNCTION_APP_NAME> -ResourceGroupName <RESOURCE_GROUP_NAME> -AppSetting @{"AzureWebJobsFeatureFlags" = "EnableWorkerIndexing"}
93-
```
94-
95-
# [VS Code](#tab/vs-code-set-indexing-flag)
96-
97-
1. Make sure you have the [Azure Functions extension for VS Code](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions) installed
98-
1. Press <kbd>F1</kbd> to open the command palette. In the command palette, search for and select `Azure Functions: Add New Setting...`.
99-
1. Choose your subscription and function app when prompted
100-
1. For the name, type `AzureWebJobsFeatureFlags` and press <kbd>Enter</kbd>.
101-
1. For the value, type `EnableWorkerIndexing` and press <kbd>Enter</kbd>.
102-
103-
---
104-
10571
## Folder structure
10672

10773
The recommended folder structure for a JavaScript project looks like the following example:

includes/functions-nodejs-model-considerations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ms.custom: include file
1414
> [!NOTE]
1515
> Version 4 of the Node.js programming model is currently in public preview.
1616
17-
- During preview, the v4 model requires you to set the app setting `AzureWebJobsFeatureFlags` to `EnableWorkerIndexing`. For more information, see [Enable v4 programming model](../articles/azure-functions/functions-reference-node.md#enable-v4-programming-model).
17+
- During preview, the v4 model requires you to set the app setting `AzureWebJobsFeatureFlags` to `EnableWorkerIndexing`. For more information, see [Enable v4 programming model](../articles/azure-functions/functions-node-upgrade-v4.md#enable-v4-programming-model).
1818
- The Node.js "programming model" shouldn't be confused with the Azure Functions "runtime".
1919
- _**Programming model**_: Defines how you author your code and is specific to JavaScript and TypeScript.
2020
- _**Runtime**_: Defines underlying behavior of Azure Functions and is shared across all languages.

0 commit comments

Comments
 (0)