hij1nx/node-chrome — pull request #6 by ForbesLindesay (2013-03-29 22:29:24+00:00)
Title: Simplify code & API

This simplifies the program to just the task of starting Google Chrome in app mode. The idea is that it takes an HTTP Server as it's argument, rather than creating one for you. This would let the user use something like express for the actual server (hopefully making app development much easier.

Another advantage is that the callback is called immediately, which lets you capture some of the messages chrome might otherwise log to stdout or stderr before websockets finishes connecting.

Finally, httpserver's listen function takes an optional port. If one is not specified, we can let it pick an available one, rather than forcing it to use the same one (and conflicting with any other apps also trying to use that one).