Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.4k views
in Technique[技术] by (71.8m points)

npm - Why can not conntect to the IP provided by my WSL console when i trying to use static-server for testing on mobile

I am using NODE and npm static-server to display my .html files on the local network.

I have no problems when I use Git Bash to deploy static-server. I was able to access from my mobile device using the ip that I got with ipconfig (the option LAN adapter Wi-Fi).

The problem is when I try to do the same process but from my WSL Terminal (Windows Subsystem for Linux).

The IP obtained with the ip address command allows me to access it from my own computer, but I cannot access it from my mobile device.

In the Git Bash environment the command ipconfig shows me several IPs including the Wi-Fi LAN adapter, and using it I was able to connect effectively. But in the WSL environment I only get one IP, and it does not work to access from my mobile through the Wi-Fi network, I just can access to it from the computer.

Does the NODE version have something to do with it? or should i use a different command in the WSL environment to obtain Wi-Fi LAN adapter IP? In this case, which command? Thanks

Commparative image Basch vs WSL and NODE version

question from:https://stackoverflow.com/questions/65925456/why-can-not-conntect-to-the-ip-provided-by-my-wsl-console-when-i-trying-to-use-s

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...