iot-nodejs icon indicating copy to clipboard operation
iot-nodejs copied to clipboard

Firefox was unable to establish a connection to the server ws: //{orgId}.messaging.internetofthings.ibmcloud.com: 8883 /.

Open Nykollas opened this issue 4 years ago • 0 comments

Can't connect to websocket with React App.

    const auth = {
      key:"API Key",
      token:"Auth token"
    }
    const identity = {
     orgId:"orgId",
     typeId:"deviceTypeId",
     deviceId:"deviceId"
    }


   let deviceConfig = new DeviceConfig(identity, auth, {});
   let deviceClient = new DeviceClient(deviceConfig);
   deviceClient.connect();
   // Do stuff
   deviceClient.disconnect();

Nykollas avatar Apr 20 '20 15:04 Nykollas