ensure live reload is on the same port as the roots server

the problem can arise when using an edited etc host file or a custom nginx file
that these two are not always the same.

fixes #330
Merge pull request #382 from jenius/sjs/websocket-port

ensure live reload is on the same port as the roots server
convert index.js to coffee
Merge pull request #383 from slang800/index.coffee-patch

convert index.js to coffee