opticache

1.0.2 • Public • Published

OptiCache Build Status Coverage Status

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 static
  • minify - html-minifer configuration options

Package Sidebar

Install

npm i opticache

Weekly Downloads

0

Version

1.0.2

License

Apache-2.0

Last publish

Collaborators

  • scottnath
  • snugug