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
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-create-first-azure-function-azure-cli-linux.md
+12-18Lines changed: 12 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,17 +5,17 @@ services: functions
5
5
keywords:
6
6
author: ggailey777
7
7
ms.author: glenga
8
-
ms.date: 11/28/2018
8
+
ms.date: 03/12/2019
9
9
ms.topic: quickstart
10
10
ms.service: azure-functions
11
-
ms.custom: mvc
11
+
ms.custom: mvc, fasttrack-edit
12
12
ms.devlang: javascript
13
13
manager: jeconnoc
14
14
---
15
15
16
16
# Create your first function hosted on Linux using Core Tools and the Azure CLI (preview)
17
17
18
-
Azure Functions lets you execute your code in a [serverless](https://azure.com/serverless) Linux environment without having to first create a VM or publish a web application. Linux-hosting is currently in preview and requires [the Functions 2.0 runtime](functions-versions.md). To learn more about preview considerations for running your function apps on Linux, see [this Functions on Linux article](https://aka.ms/funclinux).
18
+
Azure Functions lets you execute your code in a [serverless](https://azure.com/serverless) Linux environment without having to first create a VM or publish a web application. Linux-hosting requires [the Functions 2.0 runtime](functions-versions.md). Support to run a function app on Linux in the serverless [Consumption plan](functions-scale.md#consumption-plan) is currently in preview. To learn more, see [this preview considerations article](https://aka.ms/funclinux).
19
19
20
20
This quickstart article walks you through how to use the Azure CLI to create your first function app running on Linux. The function code is created locally and then deployed to Azure by using the [Azure Functions Core Tools](functions-run-local.md).
21
21
@@ -44,7 +44,7 @@ func init MyFunctionProj
44
44
When prompted, use the arrow keys to select a worker runtime from the following language choices:
45
45
46
46
+`dotnet`: creates a .NET class library project (.csproj).
47
-
+`node`: creates a JavaScript project.
47
+
+`node`: creates a JavaScript or TypeScript project. When prompted, choose `JavaScript`.
48
48
+`python`: creates a Python project. For Python functions, see the [Python quickstart](functions-create-first-function-python.md).
49
49
50
50
When the command executes, you see something like the following output:
@@ -56,6 +56,12 @@ Writing local.settings.json
56
56
Initialized empty Git repository in C:/functions/MyFunctionProj/.git/
57
57
```
58
58
59
+
Use the following command to navigate to the new `MyFunctionProj` project folder.
You must have a function app to host the execution of your functions on Linux. The function app provides a serverless environment for executing your function code. It lets you group functions as a logic unit for easier management, deployment, and sharing of resources. Create a function app running on Linux by using the [az functionapp create](/cli/azure/functionapp#az-functionapp-create) command.
76
78
77
-
In the following command, use a unique function app name where you see the `<app_name>` placeholder and the storage account name for `<storage_name>`. The `<app_name>` is also the default DNS domain for the function app. This name needs to be unique across all apps in Azure. You should also set the `<language>` runtime for your function app, from `dotnet` (C#), `node` (JavaScript), or `python`.
79
+
In the following command, use a unique function app name where you see the `<app_name>` placeholder and the storage account name for `<storage_name>`. The `<app_name>` is also the default DNS domain for the function app. This name needs to be unique across all apps in Azure. You should also set the `<language>` runtime for your function app, from `dotnet` (C#), `node` (JavaScript/TypeScript), or `python`.
78
80
79
81
```azurecli-interactive
80
82
az functionapp create --resource-group myResourceGroup --consumption-plan-location westus --os-type Linux \
> If you have an existing resource group named `myResourceGroup` with any non-Linux App Service apps, you must use a different resource group. You can't host both Windows and Linux apps in the same resource group.
86
-
87
86
After the function app has been created, you see the following message:
88
87
89
88
```output
@@ -99,9 +98,4 @@ Now, you can publish your project to the new function app in Azure.
This article showed you how to host your function app on a default Azure App Service container. You can also host your functions on Linux in your own custom container.
105
-
106
-
> [!div class="nextstepaction"]
107
-
> [Create a function on Linux using a custom image](functions-create-function-linux-custom-image.md)
Copy file name to clipboardExpand all lines: includes/functions-update-function-code.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,9 @@ author: ggailey777
6
6
manager: jeconnoc
7
7
ms.service: azure-functions
8
8
ms.topic: include
9
-
ms.date: 09/16/2018
9
+
ms.date: 03/12/2019
10
10
ms.author: glenga
11
-
ms.custom: include file
11
+
ms.custom: include file, fasttrack-edit
12
12
---
13
13
14
14
## Update the function
@@ -17,12 +17,13 @@ By default, the template creates a function that requires a function key when ma
17
17
18
18
### C\#
19
19
20
-
Open the MyHttpTrigger.cs code file that is your new function and update the **AuthorizationLevel** attribute in the function definition to a value of `anonymous` and save your changes.
20
+
Open the MyHttpTrigger.cs code file that is your new function and update the **AuthorizationLevel** attribute in the function definition to a value of `Anonymous` and save your changes.
0 commit comments