Ok,so this might be an odd question for this forum, but I can't find anything on it anywhere. I am new to web development, I've been at it for about 6 months and I'm slowly getting better. I create localhosts on my comp to view the look of my development for any website I'm building, this way I can see how the site reacts in a real-world setting. I'm positive that most developers do this. What I would like to know is if there is a way to connect an iPad or iPhone to that particular localhost so I can view how responsive my website is before I deploy it? There's got to be some way to view your developing website on a mobile device, I just have no clue on how to do that. So, if anyone is familiar with this, I would really appreciate some advice. Thanks, guys!!
For the local address field, enter localhost: followed by the port that your proxy server is running on. For example, if it's running on port 8000 , then you would enter localhost:8000 .
Exposing localhost with cloudflare tunnels Just download and install the Cloudflare Tunnel CLI tool. Run the tunnel command and point it to the host port you want to serve and it will spit out a URL.
Running localhostNavigate to http://yourname.local:8000 on your phone and you're all set!
I assume that your iPad and computer are connecting to the same wireless router. The IP of your PC and iPad should both start with 192.168... Then viewing your localhost site on iPad is absolutely possible.
e.g
If your localhost site is on the PC with IP of 192.168.0.100 with port:8080, you can connect this site on iPad through url: http://192.168.0.100:8080
If using Mac for a Rails app.
rails s --binding=192.XXX.X.XX
<-- use your IP not Xshttp://192.XXX.X.XX:3000
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With