How To Run Your Local Websites/Webapps On Your Phone
DO YOU KNOW? It is possible to run your local websites and webapps on your mobile devices without hosting them first. This is so convenient as it does not require internet connection and data charges. More often our websites are only tested on our computers for responsiveness, but they can also be tested on our mobile devices with just some few steps.
STEPS
Let me state the obvious, the required tools are a computer, a mobile device(tablet, smartphone) with WIFI/Hotspot capabilities and a WIFI router (optional).
1) You will need a server application installed on your computer (eg. XAMPP, nginx, nodejs etc.) or install live server extension inside VsCode, and they must be running.
2) Connect your computer and your mobile device to the same local network. It could be both computer and mobile device connecting to the same WIFI network, or your computer connecting directly to your phone's hotspot.
3)Open CMD and type `ipconfig `, and scroll down to Wireless LAN adapter Wi-Fi: section. Type the IPv4 address in your phone's browser and run it.
Be sure to add the port number to the address when running in on your phone. For example if your server is using http://localhost:80, add the `:80` to the address when typing it in your phone's browser. 172.20.10.6:80
CONCLUSION
With the simplest tools and software that we use everyday, you can run your local websites/webapps on your mobile devices for free.



Comments
Post a Comment