Creating and testing Azure Function locally using Azure CLI tools
Most of the recipes that you have learned so far have been created either using the browser or using Visual Studio Integrated Development Environment (IDE).
Azure also provides us with tools that help developers who love working with the command line. These tools allow us to create Azure resources right from the command line with simple commands. In this recipe, you will learn how to create a new function app and also understand how to create a function and deploy it to the Azure Cloud right from the command line.
Getting ready
- Install Node.js from https://nodejs.org/en/download/.
- Once you install Node.js, you need to install the Azure Function Core Tools npm package. Navigate to your Command Prompt and run the following command:
npm i -g azure-functions-core-tools
- As shown in the following screenshot, the tools related to Azure Functions will get installed:

How to do it...
- Once the Azure Functions Core Tools are ready, run...