DO YOU KNOW? It is possible to run your local websites and web apps 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 a 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).
- You will need a server application installed on your computer (e.g. XAMPP, nginx, nodejs etc.) or install live server extension inside VsCode, and they must be running. In this case we will be using XAMPP.
- 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.
NOTE: Make sure your PC and mobile phone are connected to the same network, either by router or by hotspot.
Be sure to add the port number to the address when running it 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 every day, you can run your local websites/web apps on your mobile devices for free.