Testing webdev on mobile devices from my laptop

While I’m developing the new UI for OurAirports.com on my laptop, I want to be able to test on various mobile devices easily, including other people’s devices (where it’s rude to root and mess around with /etc/hosts). Here’s what I did:

  • Assign my laptop a static IP address of 192.168.0.5 whenever it’s connected to my home WiFi (I’ve configured DHCP not to assign addresses under .11).
  • Go to my DNS provider, and create an A record for dev.ourairports.com pointing to 192.168.0.5.
  • In my laptop’s own /etc/hosts file, hard-code dev.ourairports.com to point to a 127.0.0.* IP address.

With these steps, the domain dev.ourairports.com will always work from my laptop, wherever it’s connected, and it will work from other devices when I am on my home WiFi (anywhere else, it will probably bring up something strange, like a router or printer login page).

I’ve played around with Docker a fair bit, but I’m still happy just running a bunch of VHOSTs for different webdev projects, and so far, it hasn’t caused me any grief.

Does anyone have better suggestions? Any gotchas I’ve missed?

This entry was posted in General. Bookmark the permalink.

4 Responses to Testing webdev on mobile devices from my laptop

  1. Blake Crosby says:

    Try Amazons Device Farm?
    https://aws.amazon.com/device-farm/

  2. I *knew* someone would suggest something that would require actual research and work. 🙂

  3. David: I checked out your website for the airport information. This is a really cool page. What did you use to build it? does it have a sql backend?

Comments are closed.