Install dependencies

Before you can get started, you should install Visual Studio Code. You should also install Node.JS which includes npm, which is how you will obtain the Azure Functions Core Tools.

Run the following command to install the Core Tools package:

npm install -g azure-functions-core-tools

The Core Tools make use of .NET Core 2.1, so you should install that, too.

Next, install the Azure Functions extension for Visual Studio Code. Once the extension is installed, click on the Azure logo in the Activity Bar. Under Azure: Functions, click Sign in to Azure… and follow the on-screen instructions.

Create an Azure Functions project

Click the Create New Project… icon in the Azure: Functions panel. You will be prompted to choose a directory for your app. Choose an empty directory.

You will then be prompted to select a language for your project. Choose node.

Create a function

Click the Create Function… icon in the Azure: Functions panel. You will be prompted to choose a template for your function.

Run your function project locally

Press F5 to run your function app.

The runtime will output a URL for any HTTP functions, which can be copied and run in your browser’s address bar.

To stop debugging, press Shift + F5.

Deploy your code to Azure

Click the Deploy to Function App… (blue up arrow) icon in the Azure: Functions panel.

You will be prompted to select a function app