Deploy to Azure App Service using the Azure CLI
In this tutorial, you deploy a Node.js application to Azure App Service using the Azure Command Line Interface (CLI), which runs on all operating systems. With the CLI you can create Azure resources, set up a deployment pipeline between a Git repository and Azure, and view the app's
- An Azure subscription.
- Node.js and npm 6.x or higher, the Node.js package manager.
- Git, after which the command
git --versionshould show a version number.
- The Azure CLI.
You can alternately use the Azure CLI extension for Visual Studio Code, which provides syntax colorization, IntelliSense (completions) and snippets when writing Azure CLI scripts.
If you don't have an Azure subscription, sign up now for a free account with $200 in Azure credits to try out any combination of services.
Sign in to the Azure CLI
Once the Azure CLI is installed, run the following command from a terminal or command prompt:
The command opens a browser window in which you're asked to log into Azure. Once you're logged in, the terminal window shows JSON output with details of your subscription.
Check npm version
If you already had Node.js installed, run the
node -v command and verify that the version is 10.x or higher. If you have an older version, upgrade to the most current LTS ("Long Term Support") release.