How to run localhost website in Android phone running on laptop
P粉369196603
P粉369196603 2023-09-03 16:09:33
0
2
568
<p>I recently started developing a website. However, I'm having trouble running it on localhost. When I type http://localhost into my web browser. I recently started developing a website. However, I'm having trouble running it on localhost. When I type http://localhost into my web browser. CSS</p>
P粉369196603
P粉369196603

reply all(2)
P粉022140576

Your localhost is the machine that runs your code, it acts like a server, but locally. If you want to access the site on your mobile phone, you'll need to find your computer's IP address. You can get this by opening a command prompt and typing ipconfig and checking the IPv4 address, there may be two, try one of them. Then make sure your phone and computer are connected to the same network (e.g. let computer and phone connect to the same WiFi. But make sure that WiFi is not private), then you can use this IP on your phone, then the port number , for example 192.158.1.38:4000, where 4000 is the port number.

Judging from your css tags, I guess you want to test the responsive code, I can suggest you check the browsing by right-clicking anywhere on the browser window and clicking "Inspect" From here, you can switch between mobile and desktop views and even choose a different mobile device to see how your site will look on those devices

If you need more help, please let me know. Hope this helps you :)

P粉440453689

Please follow the steps below: Step 1: Open CMD and write ipconfig

Step 2: Find the ipv4 address, similar to IPv4 address: 192.168.x.x

Step 3: Write the address into your mobile phone and add :PORT PORT=write the port number your website runs on at the end, it will be displayed in browser urlvscode in code> or live server extension

Website: http://192.168.x.x:PORT

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template