Wednesday, January 11, 2017

Azure Series - Hosting Angular 2 site in Azure environment

I just started in angular 2 TS script development and I wanted to showcase my demo to my senior management. The demo site was on my laptop. It was not possible for me to take my laptop every time to a different person to show my demo site.
I was searching on the net for how to host my angular demo site on the web/Internet so that I can easily showcase my skills. I hosted my first angular app on the Azure environment. Azure App Service has first-class ASP.Net , Node.js, Java, PHP, and Python support. It's very easy just follow the following steps:

Prerequisites:

  • Make sure you have synchronized your code in the GitHub repository.

Steps:

  1. Get your Azure subscription (If you don't want to buy it's free for 30 days).
    https://azure.microsoft.com/en-us/free/ 

  2. Create a Web App in the APP Service module once you have a subscription.



  1. Once the application is created, select "Deployment Options".

  1. Select the source to deploy files.


You can choose different sources as per your choice:

  1. In my case, I selected GitHub.
  2. Provide credentials for GitHub when prompted.
  3. Select the Project from GitHub
  4. Select Branch.

You are done. Let the Synchronization happen and you are ready to browse your Angular Application.

Note: I guess and I am not sure since when I hosted my Angular App it was running without any issues. I suspect the node_modules directory is already added by Microsoft when you create the web app since they support Node.js.

No comments: