A reference implementation of serverless caching and proxying using Cloudflare Workers.
This repo is intended to accompany the article Serverless caching and proxying with Cloudflare Workers, which goes into more detail on why we'd want to do this (speed, CORS proxying, avoiding rate limits).
Install wrangler:
npm install -g wrangler
Log in to Cloudflare:
wrangler login
Install dependencies:
npm install
Run local dev server
npm start
Deploy to Cloudflare:
wrangler deploy
If you have more than one Cloudflare account, you'll be asked to pick the account first. Then you'll get a workers.dev
URL where the worker can be accessed.