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 console.log output.


Azure subscription

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 Azure with Azure CLI

  1. Run the login command.

    az login

    If the CLI can open your default browser, it will do so and load an Azure sign-in page.

    Otherwise, open a browser page at and enter the authorization code displayed in your terminal.

  2. Sign in with your account credentials in the browser.

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.