Skip to content

conroyp/serverless-api-proxy-cloudflare-workers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless caching and proxying with Cloudflare Workers

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).

Setup

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.

About

A demo implementation of a serverless API proxy using Cloudflare Workers. See https://www.conroyp.com/articles/serverless-api-caching-cloudflare-workers-json-cors-proxy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published