opticache
v1.0.2
Published
Automated optimized routing cache Express middleware
Downloads
7
Readme
OptiCache
Express middleware to statically cache renders as HTML in your public folder, optimized through critical and html-minifier.
Installation and Usage
npm i opticache --save
const express = require('express');
const opticache = require('opticache');
const app = express();
// Add Express static folder
app.use(express.static('public'));
// Add Opticache to all routes (can be added individually too)
app.use(opticache({
public: 'public',
}));
Options
public
- The public folder that Express serves as a staticminify
- html-minifer configuration options