Skip to content

Express middleware to statically cache renders as HTML in your public folder, optimized through critical and html-minifier

License

Notifications You must be signed in to change notification settings

punchcard-cms/opticache

Repository files navigation

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

About

Express middleware to statically cache renders as HTML in your public folder, optimized through critical and html-minifier

Resources

License

Stars

Watchers

Forks

Packages

No packages published