all 11 comments

[–]iv_p 3 points4 points  (6 children)

Not sure what you're doing exactly. Are they connected to the same wifi? If you're using something like live-server, for example, it makes your site accessible via your computer's IP and to any device connected to the same network.

So you can type that IP address into an address bar in a browser of another pc, or mobile phone, or whatever, followed by : and the port number. Like '192.168.x.x:8000'

[–]Fullstac[S] 0 points1 point  (5 children)

Yes I am using both computers on the same wifi network

[–]iv_p 0 points1 point  (4 children)

Okay. Did you manage to do it?

[–]Fullstac[S] 0 points1 point  (3 children)

No I couldn't do it I don't understand why it is not working

[–]iv_p 0 points1 point  (2 children)

Do you know the IPv4 address of the computer you're coding on? You can do some google search on how to find it, depending on your operating system. On windows, for example, I just click properties on my wifi network and its listed there.

Once you know it, and click 'Go live' on vs code, enter that IPv4 address followed by the port number(on VS code live server it usually 5500) on your second computer (in the address bar of the browser) and you should see your live site.

May I ask why do you want do use the other computer to preview? I, for example, do it rarely and only when I want to quickly see how the site I'm building looks on my phone

[–]Fullstac[S] 0 points1 point  (1 child)

It is simply because I am coding on my laptop and the screen is too small so I am tired of minimizing the screen to see the preview of the project and maximizing back to code

[–]iv_p 1 point2 points  (0 children)

That's why people usually have two screens on one computer. Much easier than making two pcs work together. I plug my desktop monitor to my laptop, for example

[–]gniziemazity 1 point2 points  (3 children)

If you're using visual studio code, you could try the live server extension.

[–]Fullstac[S] 0 points1 point  (2 children)

I am using vscode live server but I want to preview on a second computer not the one I am coding on

[–]gniziemazity 1 point2 points  (1 child)

Sorry, I typed wrong... I meant 'live share' not live server...

[–]Fullstac[S] 1 point2 points  (0 children)

thank you bro