Home > Article > Web Front-end > webpack vue project development environment LAN binding IP method
This time I will bring you the webpack vue project development environment LAN binding IP method, the webpack vue project development environment LAN binding IP What are the precautions, the following is a practical case, let's take a look .
Idea:Fix the startup IP and port of your project. Of course, the port can also be the default 8080
Steps:
1. Check your own ip in the LAN
Command line ipconfig
2. Return to your own Development directory, find comfig/index.js
in the root directory. Modify host: your own LAN ip
Modify port: custom port - preferably not Use 80 or other commonly used ports
Example: comfig/index.js
host:'http://192.168.2.153',//一定要加上 http port:3000
Note:Once the ip here is fixed, the local host or localhost will not be accessible. This ip must also be used. The same is true for LAN access.
I believe you have mastered the method after reading the case in this article. More Please pay attention to php中文网otherrelated articles for exciting content!
Recommended reading:
Summary of vue data transfer methods
How to implement query dynamic parameter passing in vue-router
vue storejs data acquisition instructions
The above is the detailed content of webpack vue project development environment LAN binding IP method. For more information, please follow other related articles on the PHP Chinese website!