How to deploy angular-cli app on iis

后端 未结 10 1803
别那么骄傲
别那么骄傲 2020-12-23 02:17

I have simple angular2-cli app (one page with model driven form - no router involved). With \"ng serve\" all works fine. I made production version with ng build --product. I

10条回答
  •  温柔的废话
    2020-12-23 03:06

    I tried the below approach it worked.

    1. Create new website in IIS (through inetmgr)
    2. use "ng build --prod" - generating production version code
    3. Copy the dist folder's files then paste it to root folder of IIS website (Don't copy the folder and put that into root folder of IIS Website which will cause an issue)
    4. Set the credentials, authorization and etc... from your end.
    5. Set the root folder's access permission for "MACHINE_NAME\IIS_IUSRS & MACHINE_NAME\NETWORK SERVICE"
    6. Set the default page as "index.html" in IIS
    7. Now you can browse the website.

提交回复
热议问题