Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I can see how this would be useful for testing across-device inside your home network, but for resolving domains for development on my macbook I prefer dnsmasq which I set to resolve the tld .dev to localhost. [1] I'm often commuting by bus/train so I don't have a stable internet connection at all time so I couldn't use xip.io anyway.

For php apps the only thing I need to do currently is make a symlink, and an apache vhost entry makes it work [2], kinda like pow! Thinking about it, I could even make that symlink step optional, or add passenger to the mix to support nodejs/rack apps.

[1]: https://github.com/larrybolt/dotfiles/blob/master/homebrew/p...

[2]: https://github.com/larrybolt/dotfiles/blob/master/apache/999...



I usually use zeroconf/avahi for that sort of thing.


Would you mind to elaborate (give an example)?

I've toyed with bonjour spoofing before, but I always found querying was incredibly difficult, using dns-sd, e.g.:

   HOST=`(dns-sd -L "Name of Machine" _http._tcp local
   | grep -o "at .* (interface"
   | grep -o "[a-zA-Z\-]\{1,\}\.local" &
   ); sleep 1 && pkill -f dns-sq`
Obviously tailored specifically for that project, but I hope you catch my drift. And add to that the port lookup.

I'm fairly certain I'm not using it as you do, so would you mind giving an example of how your use MDNS for local dev testing?


+1 for using Apache's vhost_alias module [1]; it's interesting how few people are aware of it. DNS wildcards + vhost wildcards make for a very convenient dev environment.

[1] - http://httpd.apache.org/docs/2.2/mod/mod_vhost_alias.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: