0.0.1 • Published 11 years ago

lemmon v0.0.1

Weekly downloads
2
License
MIT
Repository
-
Last release
11 years ago

Lemmon

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:

// todo

License

MIT