Skip to content

5.1.0

Latest
Compare
Choose a tag to compare
@darrachequesne darrachequesne released this 12 Jan 05:48
bfefbde

Features

  • add option to allow usage of custom parser (#121) (48bdd87)
import { Emitter } from "@socket.io/redis-emitter";
import { createClient } from "redis";

const redisClient = createClient();

await redisClient.connect();

const io = new Emitter(redisClient, {
  parser: {
    encode(msg) {
      return JSON.stringify(msg);
    }
  }
});

Links