'live server vscode on another computer
I have 2 computers. when I open the project with live server on the first one it gives me this url 127.0.0.1:5500/index.html I want to put that url on the other computer's browser but it doesn't work. is there any solution to this?
Solution 1:[1]
This is what worked for me in VS Code:
1.- Go to your extensions option:
2.- Make sure you have the "Use Local Ip" option checked:

3.- Check on your terminal for your local Ip address (ipconfig on windows for example) and substitute the ip address from your live server url with you local ip:
Solution 2:[2]
You can try port forwarding using powershell on the hosting computer. I use wsl2 and when I want a preview on another computer I port forward using powershell
netsh interface portproxy add v4tov4 listenport=xxxx listenaddress=(host pc ip address) connectport=yyyy connectaddress=(wsl2 ip address)
In your case try making the listenaddress and connectaddress the same (which is your main pc) and the listen and connect ports 5500 using the above script.
After that the last step you should perform is add Inbound Rules inside your firewall.
Solution 3:[3]
you can go to settings live server and check the use local ip option, then you stop live server and start over again. Now live server use an direction with local ip and you can open your file in other pc. enter image description here
Solution 4:[4]
It doesn't work because you are using loopback address (127.0.0.1), in order to access your live server on entire LAN you need to change this address in vscode/liveserver settings to your private address, it will be something like (192.168.100.XXX)
Solution 5:[5]
put port 5500 in firewall to access from other pc
connect pc via lan and set static ip
then call it like xxx.xxx.xxx.xxx:5500/
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Valdemar |
| Solution 2 | Aregawi |
| Solution 3 | Carlos Medina |
| Solution 4 | samueldubik |
| Solution 5 | hossein sedighian |


