Trying to view my localhost on my ipad, so I don't need to deploy the website first

Okay, so this may be a weird question for this forum, but I can't find anything on it. I am new to web development, I have been doing this for about 6 months, and I am gradually recovering. I create localhosts on my comp to view the look of my development for any site that I create, so I can see how the site reacts in the real world. I am sure that most developers do this. I would like to know if there is a way to connect an iPad or iPhone to this particular localhost so that I can see how responsive my site is before I deploy it? There must be some way to view your development site on a mobile device, I just don't know how to do it. So, if anyone is familiar with this, I would really appreciate some advice. Thanks guys!

+4
source share
2 answers

I assume that your iPad and computer are connecting to the same wireless router. The IP address of your PC and iPad should start with 192.168 ... Then viewing your localhost site on an iPad is absolutely possible. For example, if your localhost site is located on a PC with an IP address of 192.168.0.100 with port: 8080, you can connect this site to the iPad via the URL:http://192.168.0.100:8080

+5
source

If you are using a Mac for a Rails application.

  • In terminal Ctrl-C to close the previous server
  • Go to your system settings on your Mac, then Network. When connected, you will be "Wi-Fi connected to _____________ and has an IP address of 192.XXX.X.XX."
  • , rails s --binding=192.XXX.X.XX < - IP- Xs
  • Ipad http://192.XXX.X.XX:3000
+8

All Articles