You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
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!');
|
|
};
|
|
|