KOA middleware for prerendering javascript-rendered pages on the fly for SEO
This koa middleware intercepts requests to your Node.js website from crawlers, and then makes a call to the (external) Prerender service to get the static HTML instead of the javascript for that page.
Install Prerender on a server of your choice.
$ npm install koa-prerendervarprerender=require('koa-prerender');// Optionsvaroptions={prerender: PRERENDER_SERVER_URL// optional, default:'http://service.prerender.io/'protocol: 'http',// optional, default: this.protocolhost: 'www.risingstack.com'// optional, default: this.host,prerenderToken: ''// optional or process.env.PRERENDER_TOKEN};// Use as middlewareapp.use(prerender(options));ISC
