How and what to deploy Angular2 to IIS

后端 未结 7 2115
野趣味
野趣味 2020-12-24 03:30

Take for instance angular2-quickstart. What files need to be deployed and what settings need to be set to launch this web app from IIS?

This is a Typescript tutoria

7条回答
  •  醉酒成梦
    2020-12-24 04:06

    Here is a nice and detailed explanation for deploying angular app in IIS. The summarized steps for publishing as a separate website are as follows:-

    1. Create a web site in IIS, lets say the physical path you provided for this web application is C:\Publish.
    2. publish you angular app using the below command:-

    ng build --prod

    1. After the application is built successfully copy and paste the contents of dist folder to C:\Publish folder.
    2. Add web.config file to folder C:\Publish with following contents:-

      
      
        
          
            
              
              
               
               
              
             
            
          
        
      
      
      
    3. All done, now just go to IIS and browse your web-site, you will see it working.

提交回复
热议问题