I would like to pre-compress my static assets (excluding images) and serve them.
To serve the folder public, I have:
app.use(express.static('path/to/public/'));
I believe that it express.compress()is compressed on the fly, which seems like an unnecessary load on the server processor for static assets.
What is the canonical way to achieve this?
source
share