Skip to content

Instantly share code, notes, and snippets.

Created Jul 9, 2017
What would you like to do?
import {Socket} from "phoenix"
let socket = new Socket("/socket", {params: {token: window.userToken}})
let channel ="pos", {})
.receive("ok", resp => {
console.log("Joined successfully", resp)
.receive("error", resp => { console.log("Unable to join", resp) })
export default socket
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment