Wednesday, November 6, 2019

How to Deploy An Angular Application On IIS?

This article will help every developer who works on Angular. In this article, we are going to see the steps necessary to deploy an Angular application on Internet Information Services (IIS).
Deply Of A Angular Application On IIS Deply Of A Angular Application On IIS
What is covered in this article
  • How to Install IIS.
  • Create and build an Angular application.
  • Deploy Angular application on IIS. 

 How to Install IIS

 
Deply Of A Angular Application On IIS
To install IIS, press the Windows + R key combination to bring up a run box. Then, type appwiz.cpl and press Enter.
Deply Of A Angular Application On IIS
Now, open the "Program and Features" part of the Control Panel, on the left-hand side, click on the "Turn Windows features on or off" link.
Deply Of A Angular Application On IIS
Now, click on the "Internet Information Services" checkbox. 
Deply Of A Angular Application On IIS
  • Create and build an Angular application.
  • For this article, I have created a new project in Angular 7 using the following steps.
Step 1
 
Let us create a project using the following command in Command Prompt.
 
ng new IISDemo
Step 2
Open the project in Visual Studio Code using the following command.
 
cd IISDemo
Step 3
Build the application by using the following command.
 
ng build --prod --base-href /eapp/
A folder is created in your project folder with a name list. Open C drive, create a new folder named IISDemo, and paste the dist folder content.

Deploy Angular Application on IIS

 
Now, open IIS, press the Windows + R key combination to bring up a run box. Then, type inetmgr and press Enter.
 
Deply Of A Angular Application On IIS
Now, IIS will start.
Deply Of A Angular Application On IIS 
Now, right-click on Sites and click on "Add web sites".
Deply Of A Angular Application On IIS
 
Now, right-click on Demo and click on "Add Application". Fill the alias name and set the physical path.
 
Deply Of A Angular Application On IIS
 
Deply Of A Angular Application On IIS
Now, enable Directory Browsing. 
Now, browse to your Angular application.
Right-click on the app, go to Manage Application and click on "Browse".
 
Deply Of A Angular Application On IIS
 
Deply Of A Angular Application On IIS

Summary

 
In this article, I have discussed how to deploy an Angular Application on IIS.

No comments:

Post a Comment

Lab 09: Publish and subscribe to Event Grid events

  Microsoft Azure user interface Given the dynamic nature of Microsoft cloud tools, you might experience Azure UI changes that occur after t...