Created
March 11, 2024 05:12
-
-
Save mdashlw/cdb3a6dd33bf083e38e67deda873a631 to your computer and use it in GitHub Desktop.
Connect to Derpibooru.org firehose socket using Node.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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