Use javascript to setup websocket port and key