Last active
March 8, 2018 16:48
-
-
Save FZambia/ddcbae1faba28340599f9d4f3001575d to your computer and use it in GitHub Desktop.
Connect to Centrifuge from client side.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var centrifuge = new Centrifuge("ws://localhost:8000/connection/websocket"); | |
centrifuge.on("connect", function() { | |
centrifuge.rpc({"input": "test"}).then(function(data){ | |
console.log(data); | |
}, function(err) { | |
console.log(err); | |
}) | |
}); | |
centrifuge.connect(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment