htmlcsstestingvisual-web-developerliveserver

How to run a localhost website in Android phone which is run on laptop


I recently started developing a Website. However, I am having trouble running it on localhost. When I type http://localhost in my web browser. I recently started developing a Website. However, I am having trouble running it on localhost. When I type http://localhost in my web browser. css


Solution

  • Follow the steps: Step 1: open CMD and write ipconfig

    Step 2: Find ipv4 address which is look like IPv4 Address : 192.168.x.x

    Step 3: write the address into your mobile phone and in the last add :PORT PORT= Write the PORT number on which your website is running it is shown in browser url or live server extension in vscode

    url: http://192.168.x.x:PORT