Skip to content

stacknix/stackmq-js-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stackmq

npm License

Tools for developers to implement real-time messaging

Getting started

npm install stackmq

Example

import { Stackmq } from "stackmq";

const connectionData = `<your_connection_data>`;

const stackmq = new Stackmq(connectionData);

stackmq
  .onMessage((message) => {
    console.log(message);
  })
  .onError((error) => {
    console.log({ error });
  });

Api

  • Stackmq()

Stackmq(connectionData)

Creates a new stackmq connection

  • connectionData: The connection string to the stackmq. It should be the in the format const connectionData={ client_id: <your_client_id>; host: <your_host>; mqtts_port: <your_mqtts_port>; password: <your_password>; sub_topic: <your_sub_topic>; username: <your_username>; wss_port: <your_wss_port>; }

About

Tools for developers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •