Skip to content

Commit 24eb932

Browse files
committed
Create the 2x2 tab
1 parent 097ac96 commit 24eb932

File tree

1 file changed

+29
-12
lines changed

1 file changed

+29
-12
lines changed

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

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,25 +1418,23 @@ You can see the current version that the runtime is using by logging `process.ve
14181418
14191419
### Setting the Node version
14201420
1421-
You can set the Node.js version for your function app programmatically by using the Azure CLI. The command you use to set the Node.js version depends on whether your function app runs on Windows or Linux. You can also use the portal to change the Node.js version. For more information about Node.js versions, see [Supported versions](#supported-versions).
1421+
The way that you upgrade your Node.js version depends on the OS on which your function app runs.
14221422
1423-
Before upgrading your Node.js version, make sure your function app is running on the latest version of the Azure Functions runtime. If you need to upgrade your runtime version, see [Migrate apps from Azure Functions version 3.x to version 4.x](migrate-version-3-version-4.md?pivots=programming-language-javascript).
1423+
# [Windows](#tab/windows)
14241424
1425-
# [Azure portal](#tab/azure-portal)
1425+
When running on Windows, the Node.js version is set by the [`WEBSITE_NODE_DEFAULT_VERSION`](./functions-app-settings.md#website_node_default_version) application setting. This setting can be updated either by using the Azure CLI or in the Azure portal.
14261426
1427-
The following steps apply when your function app is running on either Linux or Windows.
1427+
# [Linux](#tab/linux)
14281428
1429-
1. In the [Azure portal](https://portal.azure.com), locate your function app and select **Configuration** on the left-hand side.
1429+
When running on Windows, the Node.js version is set by the [linuxfxversion](./functions-app-settings.md#linuxfxversion) site setting. This setting can be updated using the Azure CLI.
14301430
1431-
1. Select the **Function runtime settings** tab and verify that your function app is running on the latest version of the Functions runtime.
1431+
---
14321432
1433-
1. Select the **General settings** tab and update the **Node.js Version** to the latest version. Ideally, you have already locally verified that your functions run on the version you select.
1433+
For more information about Node.js versions, see [Supported versions](#supported-versions).
14341434
1435-
:::image type="content" source="media/functions-reference-node/set-nodejs-version-portal.png" alt-text="Screenshot of setting Node.js for the function app to the latest LTS version in the Azure portal. ":::
1436-
1437-
1. When notified about a restart, select **Continue**, and then select **Save**.
1435+
Before upgrading your Node.js version, make sure your function app is running on the latest version of the Azure Functions runtime. If you need to upgrade your runtime version, see [Migrate apps from Azure Functions version 3.x to version 4.x](migrate-version-3-version-4.md?pivots=programming-language-javascript).
14381436
1439-
# [Windows](#tab/windows-setting-the-node-version)
1437+
# [Azure CLI](#tab/azure-cli/windows)
14401438
14411439
Run the Azure CLI [`az functionapp config appsettings set`](/cli/azure/functionapp/config#az-functionapp-config-appsettings-set) command to update the Node.js version for your function app running on Windows:
14421440
@@ -1447,7 +1445,21 @@ az functionapp config appsettings set --settings WEBSITE_NODE_DEFAULT_VERSION=~
14471445
14481446
This sets the [`WEBSITE_NODE_DEFAULT_VERSION` application setting](./functions-app-settings.md#website_node_default_version) the supported LTS version of `~18`.
14491447
1450-
# [Linux](#tab/linux-setting-the-node-version)
1448+
# [Azure portal](#tab/azure-portal/windows)
1449+
1450+
The following steps apply when your function app is running on either Linux or Windows.
1451+
1452+
1. In the [Azure portal](https://portal.azure.com), locate your function app and select **Configuration** on the left-hand side.
1453+
1454+
1. Select the **Function runtime settings** tab and verify that your function app is running on the latest version of the Functions runtime.
1455+
1456+
1. Select the **General settings** tab and update the **Node.js Version** to the latest version. Ideally, you have already locally verified that your functions run on the version you select.
1457+
1458+
:::image type="content" source="media/functions-reference-node/set-nodejs-version-portal.png" alt-text="Screenshot of setting Node.js for the function app to the latest LTS version in the Azure portal. ":::
1459+
1460+
1. When notified about a restart, select **Continue**, and then select **Save**.
1461+
1462+
# [Azure CLI](#tab/azure-cli/linux)
14511463
14521464
Run the Azure CLI [`az functionapp config set`](/cli/azure/functionapp/config#az-functionapp-config-set) command to update the Node.js version for your function app running on Linux:
14531465
@@ -1457,6 +1469,11 @@ az functionapp config set --linux-fx-version "node|18" --name "<FUNCTION_APP_NAM
14571469
```
14581470
14591471
This sets the base image of the Linux function app to Node.js version 18.
1472+
1473+
# [Azure portal](#tab/azure-portal/linux)
1474+
1475+
You can't change the Node.js version in the Azure portal for a function app running on Linux. Instead use the Azure CLI.
1476+
14601477
---
14611478
14621479
After changes are made, your function app restarts. To learn more about Functions support for Node.js, see [Language runtime support policy](./language-support-policy.md).

0 commit comments

Comments
 (0)