How to Deploy an Angular app on Internet Information Services (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).

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

This is image title

To install IIS, press the Windows + R key combination to bring up a run box. Then, type appwiz.cpl and press Enter.

This is image title

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.

This is image title

Now, click on the “Internet Information Services” checkbox.

This is image title

  • 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.

This is image title

Now, IIS will start.

This is image title

Now, right-click on Sites and click on “Add web sites”.

This is image title

Now, right-click on Demo and click on “Add Application”. Fill the alias name and set the physical path.

This is image title

This is image title

Now, enable Directory Browsing.

Now, browse to your Angular application.

Right-click on the app, go to Manage Application and click on “Browse”.

This is image title

This is image title

Summary

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

Thank you for reading!

#angular #IIS

How to Deploy an Angular app on Internet Information Services (IIS)
22.60 GEEK