is npm run dev a service? why can"t you use the mobile phone of the same router to access the computer"s ip plus port?
is npm run dev a service? why can"t you use the mobile phone of the same router to access the computer"s ip plus port?
npm run dev
means to execute run
instructions in the script
definition of package.json
.
are you talking about npm run dev
of webpack
?
specifies the host, to be bound to the dev environment in the config
file. You can change it to your ip.
Yes, the reason why you cannot access is that your computer does not open the port you are listening to (8000 or 8080), open the corresponding port in the firewall settings or directly open node.js
access to the network.
you can use telnet to check whether the corresponding port of the LAN address is open. And whether the port of the loop address is open. And look at how your code listens to the address.
LAN access IP setting, set localhost to 0.0.0.0
Previous: How to transfer the data from the centos server to the local windows computer on Synchronize?
Next: Es5 prototype chain inheritance, subclass calling parent class method problem