Easy HTML(5) server-sent events with JSON and HTTP.
eventserver is an asynchronous, event-driven server for sending your HTML5 web pages events from your server as per the Server-Sent Events draft as implemented in several modern browsers. It is built on top of nodejs.
- Ensure you have nodejs 0.4.x
- Grab this project from github.
- Tweak config.js to your liking.
- Run bin/eventserver.
Once the server is up and running, it will be listening on two ports:
Port 4322 is the event port. Your server-side events clients should connect to this port and await for events to arrive as per the Server-Side Events spec.
Port 4321 is the JSON port. You send HTTP POST messages to this port containing a JSON Object, and the JSON message will in turn be broadcast to all clients connected to port 4322.
To see how you might use eventserver in your own HTML5 web apps, refer to the examples.
This software is available to you under the terms of the MIT License.
Please log defects and feature requests using the github issue tracker.
You might also be interested in reading Shine's Blog.