diff options
| author | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-07-27 00:03:35 +0000 |
|---|---|---|
| committer | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-07-27 00:03:35 +0000 |
| commit | 8beb37ed67b5f2fa0f9aa85499a8f11b39c9d067 (patch) | |
| tree | bd4b05a1e374b6cb10097bbcfbc12ef51c1cb85b /node_modules/express-minify/examples/angular.js | |
| parent | 5e73fe37c32faf821d3d16f0251007e366cb090b (diff) | |
need pull
Diffstat (limited to 'node_modules/express-minify/examples/angular.js')
| -rw-r--r-- | node_modules/express-minify/examples/angular.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/node_modules/express-minify/examples/angular.js b/node_modules/express-minify/examples/angular.js new file mode 100644 index 0000000..4038418 --- /dev/null +++ b/node_modules/express-minify/examples/angular.js @@ -0,0 +1,17 @@ +var minify = require('express-minify'); +var express = require('express'); +var app = express(); + +app.use(function(req, res, next) +{ + // do not mangle angular JavaScript files + if (/-angular\.js$/.test(req.url)) { + res._uglifyMangle = false; + } + next(); +}); + +app.use(minify()); +app.use(express.static(__dirname + '/static')); + +app.listen(8080);
\ No newline at end of file |
