Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

koa-rerender

0.2.2 • Public • Published

koa-rerender

===========================

koa-rerender is perfect for Single Page Application SEO.

koa-rerender is a service that uses Chrome headless to create static HTML out of a javascript page.

Installation

npm install --save koa-rerender

Usage

You can import from koa-rerender:

import { isCrawler, launch } from 'koa-rerender';
 
if (isCrawler(ctx.request)) {
  const reRender = await launch()
  const html = await reRender.render({ url: 'https://reactjs.org/docs/portals.html' })
}
 

Keywords

none

Install

npm i koa-rerender

DownloadsWeekly Downloads

0

Version

0.2.2

License

MIT

Unpacked Size

387 kB

Total Files

22

Last publish

Collaborators

  • avatar