Skip to content

InventivetalentDev/puppeteer-ssr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

54b1596 · Feb 22, 2023
Dec 14, 2022
Feb 22, 2023
Dec 15, 2022
May 8, 2020
Dec 15, 2022
May 9, 2020
Dec 16, 2022
Dec 14, 2022
Dec 13, 2022
Dec 13, 2022
Dec 14, 2022
Dec 17, 2022
Dec 13, 2022

Repository files navigation

Puppeteer SSR

A simple serverside rendering express app using Puppeteer

Deploy

docker pull inventivetalent/puppeteer-ssr Docker Pulls

Usage

  • Clone this repo
  • cd into the directory
  • install dependencies
git clone https://github.com/InventivetalentDev/puppeteer-ssr.git
cd puppeteer-ssr
npm install
npm run build
  • Set environment variables (see app.json)

  • Start the server

# Run in shell
npm run start

# Run in background via pm2
npm run start-pm2
  • Make render requests to your server!

  • Configure your frontend server to auto-redirect crawlers to the render server

    • Copy files in /helper to your website's root directory (adjust your .htaccess if you already have one)
    • Update prerender_config.php with the address of your render server & the token