Re:Introducing Pow, a zero-configuration Rack server for Mac...
by weehuy on Thursday April 07, 2011 @05:02PM
(#2421186)
How much of this is OSX specific since it's a node.js app? Other than the launchctl and plist stuff could this be ported to linux?
[ Parent
| on HN ]
Re:Introducing Pow, a zero-configuration Rack server for Mac...
by pudquick on Friday April 08, 2011 @05:16AM
(#2423047)
The majority of the OS X -specific aspects have to do with how it launches (launchd .plist files) and how it automagically resolves .dev domains (using /etc/resolver - see: http://developer.apple.com/library/mac/#documentation/Darwin... )
Substituting launchd is easily done with any process launcher of your choice. As for the .dev TLD trick - that's a little harder, as OS X 10.6 has support for flat files inside /etc/resolver/* which the name of the file indicates what configuration/settings to use when resolving that domain. As such, they just drop a file named 'dev' in there and tell it to look to localhost on a custom port for DNS resolution. Then they run a mini DNS server on that port to resolve .dev domains to localhost.
Probably the only way to do something similar to this for linux would be to run a name server of your own on your box and add a custom zone configuration for the .dev TLD and recursive lookup for anything else.
Re:Introducing Pow, a zero-configuration Rack server for Mac...
by weehuy on Friday April 08, 2011 @09:06PM
(#2426175)
Yea this is interesting, with a little fiddling I was able to get the webserver up. It's not picking up my app yet. Though I'm not sure if it's because it's not being initialized or because I can't reach it due to not having the dns setup.