datalog / centrifuge-js

This is playground based on https://github.com/centrifugal/centrifuge-js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Centrifuge client for browser

This is playground based on https://github.com/centrifugal/centrifuge-js

Install and quick start

Just download and include centrifuge.js into your web page using script tag:

<script src="centrifuge.js"></script>

Create new Centrifuge object instance, subscribe on channel and call .connect() method to make actual connection to server:

var
centrifuge = new myCentrifuge('ws://centrifuge.example.com/connection/websocket');

centrifuge.subscribe('news', function( msg ) {

  console.log( msg );

});

centrifuge.connect();

Check original documentation if needed.

Just receive messages from Centrifuge server

You can do this with vanilla js (no centrifuge.js needed): https://github.com/datalog/centrifuge-js/blob/master/cfugolight.js

About

This is playground based on https://github.com/centrifugal/centrifuge-js


Languages

Language:JavaScript 100.0%