VUE-CLI project in the same local area network computer local phone access by IP project

0. find index.js file config folder, modify the host content hots: '0.0.0.0', this time to re-run the project, other devices can be accessed via ip

1. First make sure your computer firewall or antivirus software turned off, because most cases are caused in this manner

 

2. Next, and then allow 80 or some special port access

 

3. Click Next to enter the port number you want good access

Secondly, the computer is turned on hot spots

 

Then using a mobile phone connected to the hot spot, WIN + R input cmd, open a command line, type ipconfig to see your computer's IP address

 

Finally, using a mobile phone to access files in that directory IP address, you can visit

Guess you like

Origin www.cnblogs.com/weizaiyes/p/11416866.html