Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jwdeane/prerenderio-worker
Cloudflare Worker for integration with Prerender.io
https://github.com/jwdeane/prerenderio-worker
Last synced: 14 days ago
JSON representation
Cloudflare Worker for integration with Prerender.io
- Host: GitHub
- URL: https://github.com/jwdeane/prerenderio-worker
- Owner: jwdeane
- Created: 2022-03-29T04:28:19.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-29T04:28:28.000Z (almost 3 years ago)
- Last Synced: 2024-06-12T13:07:11.311Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Prerender.io Worker
A Worker for integrating an origin(s) with [Prerender.io](https://prerender.io).
The contents of the Worker is taken from Prerender.io's [integration documentation](https://docs.prerender.io/docs/24-cloudflare).## Get Started
Install dependencies:
```
npm i
```Edit `index.js` and add your prerendered domains to the `PRERENDERED_DOMAINS` variable:
```
const PRERENDERED_DOMAINS = ['prerender.jwdn.cc']
```Add the same domain list to the `routes` configuration in `wrangler.toml` ensuring to append `/*` if you intend the Worker to apply to all paths of the route(s):
```
routes = ["prerender.jwdn.cc/*"]
```### Deploy
```
wrangler publish
wrangler secret put PRERENDER_API_KEYwrangler publish
```⚠️ you'll see above that we had to `publish` twice as a **secret** can only be created once a Worker has already been published.