summaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'app.js')
-rw-r--r--app.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/app.js b/app.js
index 0c66cc27..327d1f75 100644
--- a/app.js
+++ b/app.js
@@ -17,6 +17,7 @@ var morgan = require('morgan');
var passportSocketIo = require("passport.socketio");
var helmet = require('helmet');
var i18n = require('i18n');
+var minifyHTML = require('express-minify-html');
//core
var config = require("./lib/config.js");
@@ -56,6 +57,18 @@ app.use(morgan('combined', {
"stream": logger.stream
}));
+if (!config.debug) {
+ app.use(minifyHTML({
+ override: false,
+ htmlMinifier: {
+ removeComments: true,
+ collapseWhitespace: true,
+ collapseBooleanAttributes: true,
+ removeAttributeQuotes: true,
+ removeEmptyAttributes: true,
+ }));
+}
+
//socket io
var io = require('socket.io')(server);