Connect your laptop and phone to the same network (Wi-Fi is a network too).
index.htmlfile to share:
- Start a web server in the same directory as the file:
ruby -run -e httpd -- --bind-address=0.0.0.0 --port=9090
- Find your hostname, or ip address:
hostname # my-pc ip addr # ... some wall of text, one line containing something like: # inet 192.168.0.38/24 ...
- Now you can use either your hostname or ip address to access your web page from your phone:
Termuxon your phone and do the exact same to access web pages from your laptop.