This forum has moved, please join us on github discussions. We will keep these old posts available for reference. Thank you!

Performance Engineering!

So after three weeks of 12hr shifts I am almost done with building a Knowledge Base system using Apostrophe. Now comes the task of speeding things on the front end. My questions are:

  1. How do I add expires headers: Express has inbuilt milddleware called static, can I just implement it normally under the index.js file?
  2. Minify JavaScript & CSS: I saw that apostrophe has something inbuilt but its not clear how to enable it? And also do I need to put the assets in specific folder for it to work? Right now I have all the JS files under lib/modules/apostrophe-pages/public/js and CSS under public/css.
  3. Enable GZIP on the server: there is nothing mentioned but again express does have gzip modules can I just implement them under lib/modules/apostrophe-express/index.js?

Any help will is greatly appreciated.


Hi parifuture, questions like this should go to Stack Overflow with the “apostrophe-cms” tag, which we keep an eye peeled for. It’s the best way to make sure the answers benefit the community.

But as an FYI, I’ve just added coverage of how to minify assets to our deployment tutorial:


I have added what appears to be an extension of this question here:

@parifuture did you figure come up with any solutions?