josephg/node-browserchannel — pull request #6 by nanovazquez (2012-03-02 18:09:39+00:00)
Title: Fix the fs.watchFile issue in a Windows platform

fs.watchFile in a Windows platform throws an exception (see here: https://github.com/joyent/node/blob/master/lib/fs.js)

The code switches to fs.watch if it's a Windows platform. It's not a bullet proof version, but at least makes browserchannel work in Windows (tested in node v0.6.6).

# Known issues
* fs.watch fires twice

# Possible improvements
* Also check node.js version, to support backward compatibility (fs.watch does not exist in 0.4.x version or older)