setup compatibility with node.js websocket