UNPKG

liberry

Version:

liberry is a command utility to help you easily set up, develop, and host your own project pattern library.

14 lines (11 loc) 305 B
//custom express middleware function var responses = []; module.exports = function AutoRefresh(req, res, next) { responses.push(res); }; module.exports.refresh = function() { while (responses.length) { responses.pop().send(); } } module.exports.url = "/BrowserRefresh";