JS (TS) Client for Centrifugo.
Built with TypeScript and Axios
import JSCent from "jscent2";
const jsCentClient = new JSCent({
url: "CENTRIFUGE_SERVER_URL",
token: "CENTRIGURE_API_TOKEN"
});
await jsCentClient.publish(
"public", // Channel name
{ // Data to publish to channel
text: "Hello, World!"
}
);