diff --git a/node/minified.js b/node/minified.js new file mode 100644 index 00000000..57978a1e --- /dev/null +++ b/node/minified.js @@ -0,0 +1,6 @@ +var minify = require('./utils/Minify'); + +exports.expressServer = function (hook_name, args, cb) { + //serve minified files + args.app.get('/minified/:filename', minify.minifyJS); +} diff --git a/node/server.js b/node/server.js index 4d4ca31e..cdd1c422 100644 --- a/node/server.js +++ b/node/server.js @@ -128,9 +128,6 @@ async.waterfall([ gracefulShutdown(); }); - //serve minified files - app.get('/minified/:filename', minify.minifyJS); - //checks for padAccess function hasPadAccess(req, res, callback) { diff --git a/pluginomatic.json b/pluginomatic.json index dc584bc8..d2083652 100644 --- a/pluginomatic.json +++ b/pluginomatic.json @@ -17,6 +17,12 @@ "hooks": { "expressServer": "../padurlsanitize:expressServer" } + }, + { + "name": "minified", + "hooks": { + "expressServer": "../minified:expressServer" + } } ] }