add websocket to its own module
refactor index.js to use websocket module
Add tests for joinRoom