Skip to content

Instantly share code, notes, and snippets.

@FZambia
Last active March 8, 2018 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FZambia/ddcbae1faba28340599f9d4f3001575d to your computer and use it in GitHub Desktop.
Save FZambia/ddcbae1faba28340599f9d4f3001575d to your computer and use it in GitHub Desktop.
Connect to Centrifuge from client side.
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