Deploy to Azure using Azure Functions

This tutorial walks you through creating and deploying a JavaScript Azure Functions application using the Azure Functions extension. Create a new app, add functions and deploy in a matter of minutes from Visual Studio Code.

Prerequisites

If you don't have an Azure account, sign up today for a free 30-day account with $200 in Azure credits to try out any combination of services.

You need Visual Studio Code installed along with Node.js and npm, the Node.js package manager.

To enable local debugging, you need to install the .NET Core 2.0 SDK along with the Azure Functions Core tools from npm.

$ npm install -g azure-functions-core-tools@core

Install the extension

The Azure Functions extension is used to create, manage, and deploy Functions Apps on Azure.

Install the Azure Functions extension

Sign in

Once the extension is installed, log into your Azure account - in the AZURE FUNCTIONS explorer, click Sign in to Azure... and follow the instructions.

sign in to Azure

Prerequisite check

Before we continue, ensure that you have all the prerequisites installed and configured.

In VS Code, you should see your Azure email address in the Status Bar and your subscription in the AZURE FUNCTIONS explorer.

Verify that you have the Azure Functions tools installed by opening a terminal and running $ func.

$ func
                  %%%%%%
                 %%%%%%
            @   %%%%%%    @
          @@   %%%%%%      @@
       @@@    %%%%%%%%%%%    @@@
     @@      %%%%%%%%%%        @@
       @@         %%%%       @@
         @@      %%%       @@
           @@    %%      @@
                %%
                %

Azure Functions Core Tools (2.0.1-beta.22)
Function Runtime Version: 2.0.11415.0

I've installed the Azure Extension