In this case, I chose to create a folder named Azure Functions Project 1 (located inside Documents\VSCode on my laptop).
Click the option to create a project.Īt this point, specify a folder for storing all required project files and information. After clicking on it, select the option to Sign in to Azure.Īfter signing in to Azure successfully with an account that has access to the subscription we will use for this, the following message will show in our browser.īack in VS Code, we can see the Function App named neworknerd0 which was previously created under our Azure subscription.
Once the extension is installed, we can see a new option on the left-hand toolbar in VS Code.
Click the Install button to install the extension. Notice we’ve done a search for the Azure Functions extension and have selected it in the search results. Npm install -g azure -functions-core-tools The screenshot below shows the install as being successful.
Next, run the code as mentioned in the previous screenshot. NET Core CLI to run projects locally, which is included in the SDK per this post). NET Core SDK since this post indicates we need. NET Core 3.1 (selected option to Download. Before running the npm command above, I downloaded and installed. I downloaded Node.js version 12.16.1 from here and installed it with no issues (link should point to latest LTS version installer for Windows / Mac). First, installing Visual Studio Code was easy.
To give context, all steps mentioned here were performed on a laptop running Windows 10 Home 18363. On the next screen we find there’s more to the process than just installing VS Code and starting to write code. We will use VS Code to build the functions, do as much as we can to verify they work as expected, and then push them up to Azure. On the next screen, let’s choose Directly publish from VS Code for the time being (in the spirit of walking before we run). Once the Quickstart menu opens, choose the option for VS Code (or Visual Studio Code) as our development environment, and click Continue. We could choose a template, but let’s run through the Quickstart again. Click the icon shown below to begin adding functions to this Function App. Go back to the Azure portal, and locate our previously created Function App (named networknerd0). In an effort to make the Azure function deployment process more automated and learn some code at the same time, here we go. Hopefully this helps someone avoid making the same mistakes. Keep in mind as a beginner I’ll be documenting both successes and failures throughout this post, so you may want to read it completely before following all steps in order. In this post, it’s time to take the next step. We created a Function App, added a function to it using the Azure portal, and made some simple tweaks. Part 1 was a first step toward understanding and using Azure Functions. The goal of this post is to use VS Code to deploy, test, and edit a simple Azure Function. This is part 2 of my quest to explore Azure Functions for self-education in functions-as-a-service.