For Ruby apps, there's also http://pow.cx/
I like to setup our designers with this, but have found it useful myself from time to time.
31–39 of 39 posts
For Ruby apps, there's also http://pow.cx/
I like to setup our designers with this, but have found it useful myself from time to time.
What are the advantages of using an approach like this vs. editing /etc/hosts directly?
You can then combine this with xip.io and be able to share your dev site with others.
One problem I've been running into: I have a virtual machine (linux running in vmware fusion on osx). I have dev.site.com in /etc/hosts. The vm is set to use a private network on the vm (as I don't want the ip address to change when I switch networks). How can I setup my phone to load dev.site.com and have it work while keeping the private network setup?
One problem I've been running into: I have a virtual machine (linux running in vmware fusion on osx). I have dev.site.com in /etc/hosts. The vm is set to use a private network on the vm (as I don't want the ip address to change when I switch networks). How can I setup my phone to load dev.site.com and have it work while keeping the private network setup?
run an http proxy on your host os and have the phone configured to use that?
Doesn't do the exact same (you'd have to add a new entry everytime, rather than point *.dev to localhost) but https://addons.mozilla.org/en-US/firefox/addon/hostadmin/ is easier to set up. It'll flush the dns cache everytime its changed.
No, you don't have to add a new entry every time, you just set it up and now absolutely.anything.dev points to localhost. When editing /etc/hosts you have to add a line for every hostname.
by using something to edit the hosts file you'd have to edit it every time (can't do wildcards on hosts file, so it needs editing every time)
Earlier quoted context omitted.
run an http proxy on your host os and have the phone configured to use that?
how does the iphone know to route requests for the private network to the host os?
Off: proxies no HTTP requests.
Manual: proxies all HTTP requests through a proxy server at the specified host and port.
Auto: uses JavaScript code hosted on a Web server at a specified (unproxied) URL to determine how HTTP requests get proxied. Assuming your proxy server is at host.example.com:8080, specifying a URL pointing to a file containing
function FindProxyForURL(url, host) {
if (shExpMatch(host, "*.vm.example.com")) {
return "PROXY host.example.com:8080";
} else {
return "DIRECT";
}
}
should proxy only HTTP requests whose URLs point to hosts in the .vm.example.com subdomain through your proxy server.Disclaimer: I haven't tested any of this, and everything I know about proxy auto-configuration comes from skimming the Wikipedia page[1] just now.
Great article for highlighting the dnsmasq on OSX idea. I wasn't aware that you could run this there. On the goal of having unlimited easy to configure real domains that point to locahost, another service of interst is localtest.me [1]. This offers *.localtest.me -> 127.0.0.1 [1]: http://readme.localtest.me/
This is pretty useful! Maybe a noob question but how does this work offline / slow internet connections? I'm coding on the train pretty frequently and I hate waiting for urls to resolve... I'm guessing it's caching this DNS entry? (why would I otherwise have to run dscacheutil -flushcache...)