stackmq
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

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>; }

Readme

Keywords

Package Sidebar

Install

npm i stackmq

Weekly Downloads

21

Version

2.0.0

License

MIT

Unpacked Size

8.79 kB

Total Files

6

Last publish

Collaborators

  • ashishislive
  • ravindra_babu
  • banid