lemmon

0.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i lemmon

Weekly Downloads

2

Version

0.0.1

License

MIT

Last publish

Collaborators

  • aliem