combohandler
combohandler copied to clipboard
Support combining files across multiple roots
It would be useful to support combining files which reside in different root paths in one HTTP request.
app.get('/js', combo.combine({rootPath: [
__dirname + '/public/js',
__dirname + '/shared/js'
]}), function (req, res) {
res.send(res.body, 200);
});
http://example.com/js?models/photo.js&widget/lightbox.js
One tricky aspect of this is having ambiguous file paths when a file of the same path resides in both roots.