Implementation of deploying IIS in Vue front end project

Time:2020-10-24

Background: Recently, we wrote a demo with Vue (not involving the call of background data), in order to give the sales team a better description of some features of products and general sensory knowledge to customers. They need to install their own projects on their laptops. As a sales person, they won’t know about NPM run in Vue For commands such as dev / serve, there is no corresponding running environment in the computer. At this time, it is necessary to use the IIS service provided by windows itself, and put the locally developed projects on this server, so as to solve the problem in this scenario.

The specific implementation steps are as follows (take win10 as an example)

1. Win + R opens the CMD command window, type control to open the control panel, and select program > enable or disable windows function

2. Select ISS service. In order not to cause some problems, click each plus sign to select all the options below

3. Then click OK to start installing what you need. The process will take a little time. Please wait patiently. If there is a problem as shown below

Need to modify registry, HKEY_ LOCAL_ Machine / software / policies / Microsoft / Windows / Windows Update / Au, where the default value of usewuserver is 1 and changed to 0; restart the computer and repeat steps 1-3 to install successfully

4. Open the control panel, adjust to the icon state, and open the management tool

5. Find the ISS service you just added and configure it

6. Right click the website > add a website and configure it accordingly

7. The physical path is the directory where the Vue project is packed (NPM run build and other packaged versions). The host name does not need to be filled in. After that, click OK to start. To prevent port name conflict, it can be set to 8082, etc

8. After startup, click Browse to preview the deployed project in the browser. So far, the local ISS deployment Vue project is completed

The above is the whole content of this article, I hope to help you in your study, and I hope you can support developeppaer more.