aboutsummaryrefslogtreecommitdiff
path: root/node_modules/express-minify-html/examples/handlebars/handlebars-example.js
diff options
context:
space:
mode:
authorHumairAK <humair88@hotmail.com>2016-07-27 06:44:05 +0000
committerHumairAK <humair88@hotmail.com>2016-07-27 06:44:05 +0000
commit6fd4613d0bf1bb78340e46d45b269ddd3c36f190 (patch)
tree91a2a795aa56d96d076acf1b202645d0e68dd47a /node_modules/express-minify-html/examples/handlebars/handlebars-example.js
parent6271b9d13139c1e55118e5f26a3a7bf8caeeb11d (diff)
added compression
Diffstat (limited to 'node_modules/express-minify-html/examples/handlebars/handlebars-example.js')
-rw-r--r--node_modules/express-minify-html/examples/handlebars/handlebars-example.js39
1 files changed, 0 insertions, 39 deletions
diff --git a/node_modules/express-minify-html/examples/handlebars/handlebars-example.js b/node_modules/express-minify-html/examples/handlebars/handlebars-example.js
deleted file mode 100644
index eb39a06..0000000
--- a/node_modules/express-minify-html/examples/handlebars/handlebars-example.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-var express = require('express');
-var minifyHTML = require('../../minifier.js');
-var exhbs = require('express-handlebars');
-
-var app = express();
-
-var hbs = exhbs.create({
- defaultLayout: 'main',
- layoutsDir: './'
-});
-
-app.engine('handlebars', hbs.engine);
-app.set('view engine', 'handlebars');
-app.set('views', './');
-
-app.use(minifyHTML({
- override: true,
- htmlMinifier: {
- removeComments: true,
- collapseWhitespace: true,
- collapseBooleanAttributes: true,
- removeAttributeQuotes: true,
- removeEmptyAttributes: true,
- minifyJS: true
- }
-}));
-
-app.get('/', function(req, res) {
- res.render('main', { hello: 'world' });
-});
-
-var server = app.listen(3000, function() {
- var host = server.address().address;
- var port = server.address().port;
-
- console.log('Handlebars example app listening at http://%s:%s', host, port);
-});