0.0.1 • Published 12 years ago
lemmon v0.0.1
Lemmon
![]()
a Small and simple wrapper to stream Comet connections from the server to the client. Named after the Lemmon Comet
usage
Be aware that Lemmon sends strings or JSON object
server:
var http = require('http')
var Lemmon = require('lemmon')
http.createServer(function (req, res) {
var comet = Lemmon(res, 3e4)
var stream = db.getStream()
stream.on('data', function (obj) {
comet.write(obj)
})
stream.on('end', function () {
comet.end()
})
})client:
// todoLicense
MIT
0.0.1
12 years ago