Automatically detecting hostname when creating websocket connection rather than hard coding to localhost
Merge pull request #1 from danhooper/master

Detect hostname for websocekt connection