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

Angular

Microsoft

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?

 IIS

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

key combination

Now, open the "Program and Features" part of the Control Panel, on the left-hand side, and click on the "Turn Windows features on or off" link.

Control Panel

Now, click on the "Internet Information Services" checkbox.

Internet Information

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, and press the Windows + R key combination to bring up a run box. Then, type inetmgr and press Enter.

Run

Now, IIS will start.

Desktop

Now, right-click on Sites and click on "Add websites".

Websites

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

Add Application

Pools

Now, enable Directory Browsing.

Now, browse to your Angular application.

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

Manage Application

CLI

Summary

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


Similar Articles