VerneMQ supports the WebSocket protocol out of the box. To be able to open a WebSocket connection to VerneMQ, you have to configure a WebSocket listener or Secure WebSocket listener in the vernemq.conf file first:
listener.ws.default = 127.0.0.1:9001
listener.wss.default = 127.0.0.1:9002
You won't be able to open WebSocket connections on a base URL, always add the /mqtt path.