Skip to content

Fire-/eventsource-node

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

EventSource

This library implements the EventSource client for Node.js. The API aims to be W3C compatible.

Install

npm install eventsource

Usage

var EventSource = require('eventsource');

es = new EventSource('http://googlecodesamples.com/html5/sse/sse.php');
es.onmessage = function(e) {
    console.log(e.data);
};
es.onerror = function() {
    console.log('ERROR!');
};

See the spec for API docs.

Example

See https://github.com/einaros/sse-example

About

EventSource client for Node.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%