{"id":22059429,"url":"https://github.com/madeinfree/rendertron-redis","last_synced_at":"2026-05-06T20:37:12.591Z","repository":{"id":44086748,"uuid":"201172870","full_name":"madeinfree/rendertron-redis","owner":"madeinfree","description":"Rendertron SSR Redis Cache Solution","archived":false,"fork":false,"pushed_at":"2022-12-31T02:23:37.000Z","size":989,"stargazers_count":3,"open_issues_count":22,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-25T20:44:28.656Z","etag":null,"topics":["redis","rendertron","ssr"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/madeinfree.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2019-08-08T03:43:03.000Z","updated_at":"2020-11-20T03:51:28.000Z","dependencies_parsed_at":"2023-01-31T17:31:51.739Z","dependency_job_id":null,"html_url":"https://github.com/madeinfree/rendertron-redis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/madeinfree/rendertron-redis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madeinfree%2Frendertron-redis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madeinfree%2Frendertron-redis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madeinfree%2Frendertron-redis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madeinfree%2Frendertron-redis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/madeinfree","download_url":"https://codeload.github.com/madeinfree/rendertron-redis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madeinfree%2Frendertron-redis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32711660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T19:35:05.142Z","status":"ssl_error","status_checked_at":"2026-05-06T19:35:03.996Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["redis","rendertron","ssr"],"created_at":"2024-11-30T17:28:47.108Z","updated_at":"2026-05-06T20:37:12.573Z","avatar_url":"https://github.com/madeinfree.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rendertron Redis\n\nThis Repo is fork from [GoogleChrome/Rendertron](https://github.com/GoogleChrome/rendertron)\n\n# Why\n\nBecause now the googleChrome/Rendertron just support google cloud cache, but our project use redis cache, so we change a little code to use redis instead of google cloud.\n\n# Support\n\n- redis\n\n# Extra Environment\n\n- REDIS_HOST: DEFAULT(localhost)\n- REDIS_PORT: DEFAULT(6379)\n\n# Config (./config.js)\n\n- cacheTool: DEFAULT(redis)\n- redisExpireTime: DEFAULT(900s)\n\n# Other\n\nThis is work find on my AWS EC2\n\n# Ubuntu Install Deps\n\ninstall some deps for google chrome.\n\n```\nsudo apt install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget\n```\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n# Rendertron [![Build status](https://travis-ci.org/GoogleChrome/rendertron.svg?branch=master)](https://travis-ci.org/GoogleChrome/rendertron) [![NPM rendertron package](https://img.shields.io/npm/v/rendertron.svg)](https://npmjs.org/package/rendertron)\n\n\u003e Rendertron is a headless Chrome rendering solution designed to render \u0026 serialise web pages on the fly.\n\n#### :hammer: Built with [Puppeteer](https://github.com/GoogleChrome/puppeteer)\n\n#### :cloud: Easy deployment to Google Cloud\n\n#### :mag: Improves SEO\n\nRendertron is designed to enable your Progressive Web App (PWA) to serve the correct\ncontent to any bot that doesn't render or execute JavaScript. Rendertron runs as a\nstandalone HTTP server. Rendertron renders requested pages using Headless Chrome,\n[auto-detecting](#auto-detecting-loading-function) when your PWA has completed loading\nand serializes the response back to the original request. To use Rendertron, your application\nconfigures [middleware](#middleware) to determine whether to proxy a request to Rendertron.\nRendertron is compatible with all client side technologies, including [web components](#web-components).\n\n**Demo endpoint**\n\nA demo Rendertron service is available at https://render-tron.appspot.com/. It is not designed\nto be used as a production endpoint. You can use it, but there are no uptime guarantees.\n\n## Contents\n\n- [Middleware](#middleware)\n- [API](#api)\n  - [Render](#render)\n  - [Screenshot](#screenshot)\n- [FAQ](#faq)\n  - [Query parameters](#query-parameters)\n  - [Auto detecting loading function](#auto-detecting-loading-function)\n  - [Rendering budget timeout](#rendering-budget-timeout)\n  - [Web components](#web-components)\n  - [Status codes](#status-codes)\n- [Installing \u0026 deploying](#installing--deploying)\n  - [Building](#building)\n  - [Running locally](#running-locally)\n  - [Deploying to Google Cloud Platform](#deploying-to-google-cloud-platform)\n  - [Deploying using Docker](#deploying-using-docker)\n  - [Config](#config)\n  - [Troubleshooting](#troubleshooting)\n\n## Middleware\n\nOnce you have the service up and running, you'll need to implement the differential serving\nlayer. This checks the user agent to determine whether prerendering is required.\n\nThis is a list of middleware available to use with the Rendertron service:\n\n- [Express.js middleware](/middleware)\n- [Firebase functions](https://github.com/justinribeiro/pwa-firebase-functions-botrender) (Community maintained)\n- [ASP.net core middleware](https://github.com/galamai/AspNetCore.Rendertron) (Community maintained)\n\nRendertron is also compatible with [prerender.io middleware](https://prerender.io/documentation/install-middleware).\nNote: the user agent lists differ there.\n\n## API\n\n### Render\n\n```\nGET /render/\u003curl\u003e\n```\n\nThe `render` endpoint will render your page and serialize your page. Options are\nspecified as query parameters:\n\n- `mobile` defaults to `false`. Enable by passing `?mobile` to request the\n  mobile version of your site.\n\n### Screenshot\n\n```\nGET /screenshot/\u003curl\u003e\nPOST /screenshot/\u003curl\u003e\n```\n\nThe `screenshot` endpoint can be used to verify that your page is rendering\ncorrectly.\n\nBoth endpoints support the following query parameters:\n\n- `width` defaults to `1000` - specifies viewport width.\n- `height` defaults to `1000` - specifies viewport height.\n- `mobile` defaults to `false`. Enable by passing `?mobile` to request the\n  mobile version of your site.\n\nAdditional options are available as a JSON string in the `POST` body. See\n[Puppeteer documentation](https://github.com/GoogleChrome/puppeteer/blob/v1.6.0/docs/api.md#pagescreenshotoptions)\nfor available options. You cannot specify the `type` (defaults to `jpeg`) and\n`encoding` (defaults to `binary`) parameters.\n\n## FAQ\n\n### Query parameters\n\nWhen setting query parameters as part of your URL, ensure they are encoded correctly. In JS,\nthis would be `encodeURIComponent(myURLWithParams)`. For example to specify `page=home`:\n\n```\nhttps://render-tron.appspot.com/render/http://my.domain/%3Fpage%3Dhome\n```\n\n### Auto detecting loading function\n\nThe service detects when a page has loaded by looking at the page load event, ensuring there\nare no outstanding network requests and that the page has had ample time to render.\n\n### Rendering budget timeout\n\nThere is a hard limit of 10 seconds for rendering. Ensure you don't hit this budget by ensuring\nyour application is rendered well before the budget expires.\n\n### Web components\n\nHeadless Chrome supports web components but shadow DOM is difficult to serialize effectively.\nAs such, [shady DOM](https://github.com/webcomponents/shadydom) (a lightweight shim for Shadow DOM)\nis required for web components.\n\nIf you are using web components v0 (deprecated), you will need to enable Shady DOM to\nrender correctly. In Polymer 1.x, which uses web components v0, Shady DOM is enabled by default.\nIf you are using Shadow DOM, override this by setting the query parameter `dom=shady` when\ndirecting requests to the Rendertron service.\n\nIf you are using web components v1 and either `webcomponents-lite.js` or `webcomponents-loader.js`,\nset the query parameter `wc-inject-shadydom=true` when directing requests to the Rendertron\nservice. This renderer service will force the necessary polyfills to be loaded and enabled.\n\n### Status codes\n\nStatus codes from the initial requested URL are preserved. If this is a 200, or 304, you can\nset the HTTP status returned by the rendering service by adding a meta tag.\n\n```html\n\u003cmeta name=\"render:status_code\" content=\"404\" /\u003e\n```\n\n## Running locally\n\nTo install Rendertron and run it locally, first install Rendertron:\n\n```bash\nnpm install -g rendertron\n```\n\nWith Chrome installed on your machine run the Rendertron CLI:\n\n```bash\nrendertron\n```\n\n## Installing \u0026 deploying\n\n### Building\n\nClone and install dependencies:\n\n```bash\ngit clone https://github.com/GoogleChrome/rendertron.git\ncd rendertron\nnpm install\nnpm run build\n```\n\n### Running locally\n\nWith a local instance of Chrome installed, you can start the server locally:\n\n```bash\nnpm run start\n```\n\n### Deploying to Google Cloud Platform\n\n```\ngcloud app deploy app.yaml --project \u003cyour-project-id\u003e\n```\n\n### Deploying using Docker\n\nRendertron no longer includes a Docker file. Instead, refer to\n[Puppeteer documentation](https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker)\non how to deploy run headless Chrome in Docker.\n\n### Config\n\nWhen deploying the service, set configuration variables by including a `config.json` in the\nroot. Available configuration options:\n\n- `datastoreCache` default `false` - set to `true` to enable caching on Google Cloud using datastore\n- `timeout` default `10000` - set the timeout used to render the target page.\n- `port` default `3000` - set the port to use for running and listening the rendertron service. Note if process.env.PORT is set, it will be used instead.\n- `width` default `1000` - set the width (resolution) to be used for rendering the page.\n- `height` default `1000` - set the height (resolution) to be used for rendering the page.\n\n### Troubleshooting\n\nIf you're having troubles with getting Headless Chrome to run in your\nenvironment, refer to the\n[troubleshooting guide](https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md)\nfor Puppeteer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadeinfree%2Frendertron-redis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadeinfree%2Frendertron-redis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadeinfree%2Frendertron-redis/lists"}