@fiberfx/phoenix
v4.1.1
Published
The Phoenix JavaScript client (Socket, Channel, Presence, LongPoll, Serializer) in TypeScript, for Mercury islands.
Readme
@fiberfx/phoenix
The Phoenix JavaScript client (Socket, Channel,
Presence, LongPoll, Serializer), ported to TypeScript for Mercury Islands.
Install
npm i @fiberfx/phoenixUse
import { Socket } from "@fiberfx/phoenix";
const socket = new Socket("/socket", { params: { token } });
socket.connect();
const channel = socket.channel("room:lobby", {});
channel.join();The package ships standard ES2024 modules (dist/index.js) with TypeScript
declarations (dist/*.d.ts). It needs no bundler: Node imports it directly, and a
browser loads it through an import map that maps @fiberfx/phoenix to the file.
License
MIT. Derived from the Phoenix JavaScript client, Copyright (c) 2014 Chris McCord; see LICENSE.
