UNPKG

data-provider-temporary

Version:

Library that helps with server-to-client synchronization of data

10 lines (8 loc) 224 B
var EventSource = require('./lib/eventsource'); var es = new EventSource('http://demo-eventsource.rhcloud.com/'); es.onmessage = function(e) { console.log(e.data); }; es.onerror = function() { console.log('ERROR!'); };