A Vue project create by vue-cli can be run with 'localhot:8080' but can not be run with ip adrees, why?
what kind of IP address?
such as "http://192.168.1.101:8080"
localhost
doesn't allow external access from our network. That'S why it's the default setting, it's secure.
Set the host to 0.0.0.0
, then other computers in the network can access it via your local IP.
Firewalls can be trouble too. I had to disable the Firewall of Windows to use that feature.
Most helpful comment
localhost
doesn't allow external access from our network. That'S why it's the default setting, it's secure.Set the host to
0.0.0.0
, then other computers in the network can access it via your local IP.