ericf / express-handlebars

A Handlebars view engine for Express which doesn't suck.
BSD 3-Clause "New" or "Revised" License
2.31k stars 384 forks source link

Compress html #40

Closed getchenge closed 11 years ago

getchenge commented 11 years ago

I don't know if express3-handlebars could compress the rendered html just as the jade does.

DrMabuse23 commented 11 years ago

have a look on handlebars-runtime

ericf commented 11 years ago

Express-Handlebars is simply the glue code between Handlebars and Express. It doesn't deal with generating HTML (Handlebars does that) or sending an HTTP response (Express does that). I think you shouldn't worry about minifying HTML and instead simply gzip the response.

To gzip responses simply use the compress middleware in Express:

app.use(express.compress());
getchenge commented 11 years ago

Got it, thank u.