mineverything is a middleware (read: layer) between ExpressJS and minification libraries like uglify-js and uglifycss.
var express = require('express');
var mineverything = require('mineverything');
var app = express();
app.use('/js', mineverything({ sourcePath: 'web/js', type: 'js' }));
// http://localhost/js/anyfile.js will be automatically served as minified.
app.use('/css', mineverything({ sourcePath: 'web/css', type: 'css' }));
// http://localhost/css/anyfile.css will be automatically served as minified.
app.listen(80);
mineverything(options); // returns middleware
Possible values: "js" and "css" Defaults to: js
I.e.: ".minified.js" Defaults to: ".minified.[type]"
Relative to the directory in which the main application is contained. I.e.: "web/js" Defaults to: "."