Open darrachequesne opened 10 months ago
Question: would it make sense to create a package from this? Something like:
import { Server } from "socket.io"; import pg from "pg"; import { initNamespace } from "@socket.io/chat-platform"; import { createAdapter } from "@socket.io/chat-platform-postgresql"; const io = new Server(); const pgPool = new pg.Pool(); initNamespace(io, { namespaceName: "/chat", adapter: createAdapter(pgPool), });
The initNamespace() method would handle the basic plumbing:
initNamespace()
Thoughts?
Question: would it make sense to create a package from this? Something like:
The
initNamespace()
method would handle the basic plumbing:Thoughts?