Skip to content

Instantly share code, notes, and snippets.

@mdashlw
Created March 11, 2024 05:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdashlw/cdb3a6dd33bf083e38e67deda873a631 to your computer and use it in GitHub Desktop.
Save mdashlw/cdb3a6dd33bf083e38e67deda873a631 to your computer and use it in GitHub Desktop.
Connect to Derpibooru.org firehose socket using Node.js
import { Socket } from "phoenix";
import { WebSocket } from "undici";
const socket = new Socket("wss://derpibooru.org/socket", {
transport: WebSocket,
debug: true,
sessionStorage: {},
});
const firehose = socket.channel("firehose");
socket.connect();
firehose.join();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment