aboutsummaryrefslogtreecommitdiff
path: root/node_modules/express-minify/examples/angular.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/express-minify/examples/angular.js')
-rw-r--r--node_modules/express-minify/examples/angular.js17
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