How to enable Gzip compression on the Ghost blogging platform

So far I've really been enjoying Ghost. I did notice that out of the box, gzip compression was not enabled though. Enabling this will allow pages to be compressed and speed up load times.

Enabling gzip on Ghost 0.3 turned out to be pretty easy since its already built in to Express. All I had to do was open up the server.js file and replaced this line:

// ##Custom Middleware


// ##Custom Middleware

After restarting the node process, I loaded up the network panel in my browser, navigated to my site, and saw that gzip compression was now enabled.

more ghost posts