I am currently using a free version of HiveMQ and trying to integrate MQTT in the React Native project.
There is a doc on JavaScript integration in “Getting Started” section and followed the tutorial.
This code snippet is a setup according to tutorial:
var options = {
host: ‘myHostName’,
port: 8883,
protocol: ‘mqtts’,
username: ‘myUserName’,
password: ‘myPassword’
}
After I integrated, the web console gives an error message:“WebSocket connection to ‘wss://localhost:8883/’ failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED”
Does anyone know how to solve this issue?