All Projects → funliday → pppr

funliday / pppr

Licence: MIT License
pppr is a prerender service

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to pppr

Blazar
Pre-Render Pages on the Fly in Laravel
Stars: ✭ 14 (-22.22%)
Mutual labels:  prerender, puppeteer
Puppetron
Puppeteer (Headless Chrome Node API)-based rendering solution.
Stars: ✭ 429 (+2283.33%)
Mutual labels:  prerender, puppeteer
Linkedin Profile Scraper
🕵️‍♂️ LinkedIn profile scraper returning structured profile data in JSON. Works in 2020.
Stars: ✭ 171 (+850%)
Mutual labels:  expressjs, puppeteer
http-server-pwa
👾 http-server alike but for serving and rendering PWA: pwa-server
Stars: ✭ 14 (-22.22%)
Mutual labels:  expressjs, puppeteer
angular-rollup-starter
Angular2 & Rollup.js including AoT and Universal Prerendering
Stars: ✭ 33 (+83.33%)
Mutual labels:  prerender
cwp
Cross-platform Web Programming Course
Stars: ✭ 21 (+16.67%)
Mutual labels:  expressjs
MERN-E-Commerce
A simple E-Commerce app built on MERN stack with integrated Stripe Checkout.
Stars: ✭ 57 (+216.67%)
Mutual labels:  expressjs
TrackPurchase
단 몇줄의 코드로 다양한 쇼핑 플랫폼에서 결제 내역을 긁어오자!
Stars: ✭ 19 (+5.56%)
Mutual labels:  puppeteer
whatsapp-tracking
Scraping the status of WhatsApp contacts
Stars: ✭ 49 (+172.22%)
Mutual labels:  puppeteer
Spotify-Headless
Experimental wrapper for Spotify API to search songs and control the web player using the CLI. (Feat. Puppeteer)
Stars: ✭ 73 (+305.56%)
Mutual labels:  puppeteer
php-chrome-html2pdf
A PHP library for converting HTML to PDF using Google Chrome
Stars: ✭ 53 (+194.44%)
Mutual labels:  puppeteer
typescript-express-passportjs
ExpressJs project uses TypeScript, PassportJS, Moongose, Continuous Integration (CircleCI.io) and Code Coverage (CodeCov.io)
Stars: ✭ 14 (-22.22%)
Mutual labels:  expressjs
puppeteer-electron-quickstart
Quickstart project to run puppeteer library from an Electron application. Using ES-6 and babel.
Stars: ✭ 52 (+188.89%)
Mutual labels:  puppeteer
Attendance-Portal
We have developed a cutting-edge attendance recorder. Using face recognition, you can easily record attendance and have access to in-depth analysis and a wide range of functionalities. Because of the covid-19 pandemic, stringent guidelines have been established, and precautions must be made to minimise unnecessary physical encounters. As a resul…
Stars: ✭ 20 (+11.11%)
Mutual labels:  expressjs
vrt-react
Take a screenshot 📸 of React component. Push it and compare images in pull request.
Stars: ✭ 19 (+5.56%)
Mutual labels:  puppeteer
chattt-backend
🖥 Backend for chattt
Stars: ✭ 17 (-5.56%)
Mutual labels:  expressjs
Askme
Social media app to ask and answer user questions and interact with users
Stars: ✭ 16 (-11.11%)
Mutual labels:  expressjs
node-slack-events-api
Slack Events API for Node
Stars: ✭ 93 (+416.67%)
Mutual labels:  expressjs
timeoff-server
TimeOff is an application that allows companies' employees to set vacations before they begin taking their time off. Implemented in modern tech stack i.e. Node, Express, MongoDB.
Stars: ✭ 33 (+83.33%)
Mutual labels:  expressjs
hotshot
Takes screenshots of DOM elements
Stars: ✭ 19 (+5.56%)
Mutual labels:  puppeteer

pppr logo

pppr version pppr downloads pppr license

pppr

pppr is a zero-configuration prerender service. If you develop a web via client-side rendering (such as Vue, Angular, React...), you can integrate Nginx (or other reverse proxy) and pppr for search engine crawler (such as googlebot, bingbot...) and social network (such as Facebook, Twitter...) to render complete HTML.

Usage

const pppr = require('pppr');

app.use(pppr());

Installation

npm i pppr

Configuration

Nginx

Configuration

Cache (default is turn on)

app.use(pppr());

// equals to

app.use(pppr({
  cache: true
}));

If you want to turn off cache, you can do below configuration.

app.use(pppr({
  cache: false
}));

If you want to modify cache parameter, you can do below configuration.

app.use(pppr({
  cache: {
    max: 50, // LRU cache entry max count (default is 50)
    maxAge: 300000 // LRU cache entry max age (milliseconds, default is 300000)
  }
}));

Retry times (default is 5)

If it renders occur timeout, you can retry render again.

app.use(pppr({
  retryTimes: 5
}));

Endpoint (default is /render)

If endpoint conflicts, you can change it.

app.use(pppr({
  endpoint: '/render'
}));

Callback

If you want to do something before/after render, you can do below configuration.

app.use(pppr({
  beforeRender: (userAgent, url) => {
    // do something
  },
  afterRender: (userAgent, url, content) => {
    // do something
  }
}))

How-to

server side rendering

When Nginx received a request, it will check it is crawler or not. If it is crawler, it will forward to prerender service (such as pppr). Otherwise it will forward to web server.

Lyrics

I have a page, I want to prerender it.

Ah, pppr.

Inspired from

prerender/prerender

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].