Package Exports
- @supabase/realtime-js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@supabase/realtime-js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Realtime Client
A simple wrapper over phoenix-channels. This allows you to pass absolute URLs with query parameters appended to it.
This is a skin of a Node.js client. If you need a client for the browser use phoenix
Usage
This uses the same API as the original phoenix except that it needs an absolute url
const { Socket } = require('phoenix-channels')
let socket = new Socket("ws://example.com/socket")
socket.connect()
// Now that you are connected, you can join channels with a topic:
let channel = socket.channel("room:lobby", {})
channel.join()
.receive("ok", resp => { console.log("Joined successfully", resp) })
.receive("error", resp => { console.log("Unable to join", resp) })
Presence
is also available
Authors
Node.js client was made by Mario Campa of phoenix-channels.
API was made by authors of the Phoenix Framework
- see their website for complete list of authors.
License
License is the same as phoenix-channels and Phoenix Framework (MIT).