在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:RisingStack/koa-prerender开源软件地址:https://github.com/RisingStack/koa-prerender开源编程语言:JavaScript 100.0%开源软件介绍:koa-prerenderKOA 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. SetupPrerequisitesInstall Prerender on a server of your choice. Install$ npm install koa-prerender Usagevar prerender = require('koa-prerender');
// Options
var options = {
prerender: PRERENDER_SERVER_URL // optional, default:'http://service.prerender.io/'
protocol: 'http', // optional, default: this.protocol
host: 'www.risingstack.com' // optional, default: this.host,
prerenderToken: '' // optional or process.env.PRERENDER_TOKEN
};
// Use as middleware
app.use(prerender(options)); LicenseISC |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论