Lali Lali - 4 months ago 338x
AngularJS Question

Deploy angular application on IIS

I am working on AngularJs application with node.js. Using gulp, I have created (compiled) my application (

in below image) and got the following directories

enter image description here

Now I completely struck how to proceed next. I want to host this application over IIS to run and see the pages (in
folder) but I don't know how to host it on IIS.

I tried this article, but it guides to use express server.

The issue is, how IIS will figure out that the first page lies in
folder, and even if I use the complete url


it shows me all angular code with brackets like

Do I need web.config file here or not. If yes then how I will define entry point to the application?


Just have to configure a Web Application under a website in IIS and create a custom web.config.

  1. In IIS, go to the Default Web Site, right-click and select Add Web Application
  2. Set the Alias to be AngularApp and the Physical Path to be the root of your directory
  3. Add a web.config file at the root of the directory with the following code <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <defaultDocument> <files> <add value="views/index.html" /> </files> </defaultDocument> </system.webServer> </configuration>

  4. Browse to your new Angular application by going to http://localhost/AngularApp (assuming http binding in IIS).