This time I will bring you a detailed explanation of the LAN access steps for the webpack vue project. What are theprecautions for LAN access for the webpack vue project? The following is a practical case, let's take a look.
Idea:Fix your project startup IP and port. Of course, the port can also be the default 8080
Steps:
1. Check your ip in the LAN
Command line ipconfig2.Reply Go to your development directory and find comfig/index.js in the root directory
Modify host: your own LAN ip Modify port: Custom port - it is best not to use 80 or Other commonly used portsExample: comfig/index.js
host:'http://192.168.2.153',//一定要加上 http port:3000
Note:This Once the ip is fixed, the local host or localhost will not be accessible. This ip must also be used. The same applies to the LAN. Use this ip to access
I believe you have mastered the method after reading the case in this article. Please pay attention for more exciting things. Other related articles on php Chinese website! Recommended reading:FIFO/LRU implementation of caching algorithm
How to operate Node static resource server
The above is the detailed content of Detailed explanation of LAN access steps for webpack+vue project. For more information, please follow other related articles on the PHP Chinese website!