
centrifuge-js
JavaScript client SDK that connects a browser, Node.js or React Native app to a Centrifugo or Centrifuge server over WebSocket or HTTP-based transports.
centrifuge-js is a JavaScript client SDK that connects a browser, a Node.js process or a React Native app to a Centrifugo or Centrifuge server. WebSocket is the main transport. When a WebSocket connection cannot be established, for example behind a corporate firewall or proxy, the SDK can use HTTP-streaming or SSE instead, and it offers WebTransport as an experimental option. The library works with JSON by default, and a separate Protobuf build sends binary payloads.
The package is installed from npm, or loaded in a page from a CDN script. The SDK documentation holds the feature matrix. Centrifugal Labs LTD maintains the SDK under the MIT license.
Worth knowing
The SDK is a client only. A Centrifugo or Centrifuge server must accept the connection, and the HTTP fallbacks need bidirectional emulation enabled on the server first. SockJS usage is deprecated.
Sources
- 2026-11-04: links
centrifugal.dev - 2026-11-04: links, License, Written in, Categories, Install with, GitHub stars
github.com/centrifugal/centrifuge-js - 2026-11-04: links
centrifugal.dev/docs/transports/client_sdk - 2026-11-04: Maintainer, License model
github.com/centrifugal/centrifuge-js/blob/master/LICENSE - 2026-11-04: Headquarters
centrifugal.dev/company - 2026-11-04: npm downloads a week
api.npmjs.org/downloads/range/2026-10-26:2026-11-01/centrifuge - 2026-11-04: Contributors
api.github.com/repos/centrifugal/centrifuge-js/contributors?per_page=1 - 2026-11-04: Current major version, Last release
github.com/centrifugal/centrifuge-js/releases/tag/5.8.0 - 2026-11-04: First release
registry.npmjs.org/centrifuge