Skip to content

datalog/centrifuge-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published