|
1 | 1 | ---
|
2 | 2 | title: Create a JavaScript function from the command line - Azure Functions
|
3 | 3 | description: Learn how to create a JavaScript function from the command line, then publish the local Node.js project to serverless hosting in Azure Functions.
|
4 |
| -ms.date: 11/03/2020 |
| 4 | +ms.date: 11/18/2021 |
5 | 5 | ms.topic: quickstart
|
6 | 6 | ms.custom: devx-track-azurecli, devx-track-azurepowershell
|
7 | 7 | ---
|
@@ -30,7 +30,7 @@ Before you begin, you must have the following:
|
30 | 30 |
|
31 | 31 | + The Azure [Az PowerShell module](/powershell/azure/install-az-ps) version 5.9.0 or later.
|
32 | 32 |
|
33 |
| -+ [Node.js](https://nodejs.org/) version 14. |
| 33 | ++ [Node.js](https://nodejs.org/) version 14 or 16 (preview). |
34 | 34 |
|
35 | 35 | ### Prerequisite check
|
36 | 36 |
|
@@ -109,18 +109,18 @@ Each binding requires a direction, a type, and a unique name. The HTTP trigger h
|
109 | 109 | # [Azure CLI](#tab/azure-cli)
|
110 | 110 |
|
111 | 111 | ```azurecli
|
112 |
| - az functionapp create --resource-group AzureFunctionsQuickstart-rg --consumption-plan-location <REGION> --runtime node --runtime-version 12 --functions-version 3 --name <APP_NAME> --storage-account <STORAGE_NAME> |
| 112 | + az functionapp create --resource-group AzureFunctionsQuickstart-rg --consumption-plan-location <REGION> --runtime node --runtime-version 14 --functions-version 4 --name <APP_NAME> --storage-account <STORAGE_NAME> |
113 | 113 | ```
|
114 | 114 |
|
115 |
| - The [az functionapp create](/cli/azure/functionapp#az_functionapp_create) command creates the function app in Azure. If you're using Node.js 10, also change `--runtime-version` to `10`. |
| 115 | + The [az functionapp create](/cli/azure/functionapp#az_functionapp_create) command creates the function app in Azure. If you're using Node.js 16, also change `--runtime-version` to `16`. |
116 | 116 |
|
117 | 117 | # [Azure PowerShell](#tab/azure-powershell)
|
118 | 118 |
|
119 | 119 | ```azurepowershell
|
120 |
| - New-AzFunctionApp -Name <APP_NAME> -ResourceGroupName AzureFunctionsQuickstart-rg -StorageAccount <STORAGE_NAME> -Runtime node -RuntimeVersion 12 -FunctionsVersion 3 -Location <REGION> |
| 120 | + New-AzFunctionApp -Name <APP_NAME> -ResourceGroupName AzureFunctionsQuickstart-rg -StorageAccount <STORAGE_NAME> -Runtime node -RuntimeVersion 14 -FunctionsVersion 4 -Location <REGION> |
121 | 121 | ```
|
122 | 122 |
|
123 |
| - The [New-AzFunctionApp](/powershell/module/az.functions/new-azfunctionapp) cmdlet creates the function app in Azure. If you're using Node.js 10, change `-RuntimeVersion` to `10`. |
| 123 | + The [New-AzFunctionApp](/powershell/module/az.functions/new-azfunctionapp) cmdlet creates the function app in Azure. If you're using Node.js 16, change `-RuntimeVersion` to `16`. |
124 | 124 |
|
125 | 125 | ---
|
126 | 126 |
|
|
0 commit comments