Skip to main content

Client SDK Setup

You can use any Pusher Client SDK to connect to Pingerchips. We will be using Pusher JS for this example.

Installation

note

You can skip this step if you already have the Pusher JS SDK installed in your project

npm install pusher-js

Usage

import Pusher from "pusher-js";

let pusher = new PusherJS(<APP KEY>, {
wsHost: "ws.pingerchips.com",
wsPort: 6001,
forceTLS: false,
encrypted: true,
disableStats: true,
enabledTransports: ["ws", "wss"],
cluster: "mt1",
});

let channel = pusher.subscribe("my-channel");
channel.bind("my-event", function (data) {
alert("Received my-event with message: " + data.message);
});