1.1.2 • Published 9 years ago

express-buffer-response v1.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

express-buffer-response

Buffer express response and call back when finished

Usage

var BufferRes = require('express-buffer-response');
app.use(function(req, res, next) {
	if (req.method != "GET") return next();
	// here be cache read logic
	BufferRes(res, function(err, bl) {
		// get the err from onFinished
		// and a bufferList containing the actual response chunks
		// here be cache store logic
		bl.pipe(fs.createWriteStream('cachefile'));
	});
	next();
});

Nota bene

Works with express-session since 1.0.3

License

MIT

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago