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
Azure Functions is an event-based serverless compute experience in the cloud to accelerate your development. You can write just the code you need for the problem at hand, without worrying about a whole application or the infrastructure to run it. Functions can make development even more productive, and you can use your development language of choice, such as C#, F#, Node.js, Python or PHP. Pay only for the time your code runs and trust Azure to scale as needed. Azure Functions enables you to develop serverless applications on Microsoft Azure.
15
-
16
-
Azure functions is a way to create and run snippets of code –– functions –– in the cloud. https://docs.microsoft.com/en-us/azure/azure-functions/functions-overview
14
+
Azure functions is a way to create and run event-driven snippets of code –– functions –– in the cloud, without having to explicitly provision or manage infrastructure. For more information about Azure Functions, see the [Azure Functions documentation](https://docs.microsoft.com/azure/azure-functions/).
17
15
18
16
## Requirements
19
17
20
-
- Azure Function tools are included in Visual Studio for Mac 7.5.
21
-
22
-
To create and deploy functions you also need:
18
+
Azure Function tools are included in **Visual Studio for Mac 7.5**.
23
19
24
-
-Azure subscription (available free from [https://azure.com/free](https://azure.com/free))
20
+
To create and deploy functions you also need an Azure subscription, which available free from [https://azure.com/free](https://azure.com/free).
25
21
26
22
## Creating your first Azure Functions project
27
23
28
24
1. In Visual Studio for Mac, select **File > New Solution…**
29
-
2. From the New Project dialog, select the Azure functions template under **Cloud > General** and click **Next**:
25
+
2. From the New Project dialog, select the Azure Functions template under **Cloud > General** and click **Next**:
3. Enter a **Project Name** and select **Create**.
32
28
29
+
Visual Studio for Mac creates a .NET Standard project with a default HttpTrigger function included. It also includes NuGet references to a variety of **AzureWebJobs** packages, as well as the **Newtonsoft.Json** package.
30
+
31
+

32
+
33
+
The new project contains the following files:
34
+
35
+
***HttpTrigger.cs** – This class contains boilerplate code for a HTTPFunction. It contains a **FunctionName** attribute with the function name, and a trigger attribute, **HttpTrigger**, that specifies that the function is triggered by a HTTP request. For more information on the function method, refer to the [Azure Functions C# developer reference](https://docs.microsoft.com/azure/azure-functions/functions-dotnet-class-library) article.
36
+
***host.json** – This file describes the global configuration options for Functions host. For an example file and information on the available settings for this file, see the [host.json reference for Azure Functions](https://docs.microsoft.com/azure/azure-functions/functions-host-json).
37
+
***local.settings.json** – This file contains all the settings for running functions locally. These settings are used by the Azure Functions Core Tools. For more information, see [Local settings file](https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local#local-settings-file) in the Azure Functions Core Tools article.
38
+
39
+
Now that you've created a new Azure Functions project in Visual Studio for Mac, you can test out the default HTTP-triggered function from your local machine.
40
+
33
41
<!--
34
42
## Create an Azure storage account
35
43
@@ -53,12 +61,12 @@ With Azure Functions support in Visual Studio for Mac you can test and debug you
53
61
54
62
1. To test your function locally, press the **Run** button in Visual Studio for Mac:
55
63

56
-
1. Running the project starts local debugging on the Azure Function and opens a new Terminal window, as illustrated in the following image:
64
+
2. Running the project starts local debugging on the Azure Function and opens a new Terminal window, as illustrated in the following image:
57
65
58
66

59
67
60
68
Copy the URL from the output.
61
-
1. Paste the URL for the HTTP request into your browser's address bar. Add the query string `?name=<yourname>` to the end of the URL and execute the request. The following image shows the response in the browser to the local GET request returned by the function:
69
+
3. Paste the URL for the HTTP request into your browser's address bar. Add the query string `?name=<yourname>` to the end of the URL and execute the request. The following image shows the response in the browser to the local GET request returned by the function:
62
70

63
71
64
72
## Creating a new function
@@ -70,13 +78,18 @@ Function Templates enable you to quickly create new functions using the most com
70
78

71
79
72
80
2. To add a new function, right-click on the project name and select **Add > Add Function...**:
81
+
73
82

83
+
74
84
3. From the **New Azure Function** dialog, select the function you require:
85
+
75
86

76
87
77
-
The following Function templates are provided:
88
+
A list of the Azure Function templates are provided in the following section.
89
+
90
+
## Available function templates
78
91
79
-
-**HTTP** – Trigger the execution of your code by using an HTTP request. There are explicit templaes for the following HTTP triggers:
92
+
-**HTTP** – Trigger the execution of your code by using an HTTP request. There are explicit templates for the following HTTP triggers:
0 commit comments