Deploying a Node.js app in Microsoft Azure using Git


Step 1: Analyze your app
Step 2: Choose a Microsoft Azure environment
Step 3: Initialize git repository
Step 4: Push the app to the cloud

Step 1: Analyze your app

Hi :)

First of all, you need to analyze your Node.js application goals in order to decide, what kind of solution you are going to choose in Microsoft Azure. 
Microsoft Azure offers several ways to host web sites: Azure WebsitesCloud Services, and Virtual Machines.

Let's make easy to know how to do this.


Step 2: Choose a Microsoft Azure environment

So, basically Microsoft Azure offers three cloud deployment models for applications to be deployed in any of the eight Microsoft global datacenters: Virtual Machines (VMs), Cloud Services and Web Sites. The most appropriate deployment model depends on the level of scale, control and flexibility you require. 

To choose the most appropriate solution for your app, here we have a decision tree for determining where to deploy your Node.js solution, based on infrastructure and software components required by the application. 

Decision tree :)

Step 3: Initialize git repository

Ok, let's do this fast.

1. Get Git (Get it here if you don't have it yet)

2. Download the next working example of a Node.js app from Github here

     Or clone it :)
git clone
3. Init Git repository (if you did not clone it)

Go to your Node.js application path then type this:
git init
git add .
git commit -m "initial commit"

Step 4: Push the app to the cloud

Before pushing the app to the cloud, we need to create one of the three cloud deployment models in Microsoft Azure with Git repository.

Here I share you some articles for each cloud solution:

For Virtual Machines is a little bit more complicated, but Michael Dukehall explain us how to setup a VM with Ubuntu, Node.js and express.

Virtual Machines 

Then by SSH install Git with the following command:

sudo apt-get install git

Alright, we have now a git repository in our cloud solution, now is time to push our application to the cloud
git remote add azure {remote azure git repository}
git push azure master

Popular posts from this blog

Integrar Web API de .NET en proyecto de Xamarin.Forms utilizando Visual Studio y Azure API App

How to implement OAuth 2.0 server with Redis

Enviar mensajes a Azure IoT Hub desde Raspberry usando Node.js y Docker (parte I – instalación)

Configurar y desplegar una Web API en Azure App Service Environment

Integración Continua para Android Xamarin.Forms usando VS Team Services, VS Source Control y VS Mobile Center