js--puppeteer-renderer-middleware
v0.1.5
Published
An Express middleware for puppeteer-renderer
Downloads
21
Maintainers
Readme
puppeteer-renderer-middleware
An Express middleware for puppeteer-renderer to use for SSR with puppeteer renderer.
Difference with middleware provided by @zenato - it's rewritten in ts. And it's keeping updated (open for feature requests);
Usage
$ npm install --save express js--puppeteer-renderer-middleware
const express = require('express');
const puppeteerRenderer = require('js--puppeteer-renderer-middleware');
const app = express();
app.use(puppeteerRenderer({
url: 'http://puppeteer-renderer/render',
// userAgentPattern: /Custom-Bot-Agent/i,
// excludeUrlPattern: /*.html$/i
// timeout: 30 * 1000,
}));
// other codes..
app.listen(8080);