Deploy a Node.js Application to Azure
In this walkthrough, you will deploy a Node.js application to the Azure cloud, all in a matter of minutes.
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.
Install the Azure Command Line Interface (CLI) which you will use the CLI to do the following:
- Create an Azure Website.
- Set up a deployment pipeline between a local/remote Git repository and the Website.
- View your application's logs (
Install the Azure CLI
The Azure CLI is cross platform and runs on Windows, macOS, as well as many different Linux distributions.
Once installed, you can use the
az command from your favorite terminal.
Following the instructions, browse to https://aka.ms/devicelogin and paste in the 9 character code. When prompted, use the email address and password you used when creating your Azure account.
$ az login To sign in, go to https://aka.ms/devicelogin and enter the code BF9BUDLGR to authenticate.
Before we continue, ensure that you have all of the prerequisites properly installed. Type each command and ensure it displays the version you have installed. If your Node.js version is less than 6, please upgrade to the most current LTS ("Long Term Stable") release.
$ node -v 6.10.2
Now check that you have
git installed. If not, install it and test again.
$ git --version git version 2.6.4