Skip to content

RFC: create a package #3

Description

@darrachequesne

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:

  • channel management
  • messaging
  • presence notification

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions