npm install phoenix-channelsThe differece with the original client is that this does not use long-polling and you need to pass the absolute url instead of the relative url.
javascript
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 availableInstallation
npm install --save phoenix-channels`Ported to Node.js by Mario Campa
The same as Phoenix Framework (MIT)