moved WebSocket client code into the existing config.js file.