Skip to content
/ blog Public

Using Cloudflare Workers to proxy dev.to posts and cache at edge

Notifications You must be signed in to change notification settings

brycedorn/blog

Repository files navigation

Deploy RSS

A project built using Hono for Cloudflare Workers. Uses KV for edge caching and thumbhash to generate image placeholders.

Fork and deploy your own for free!

Development

Install dependencies:

npm install

Set up environment:

cp .env.example .env

Start via miniflare:

npm start

Updating cache

This project uses KV as a distributed store for article data and image placeholders.

To populate the cache, open the /update endpoint in your browser with the password set in environment passed via query parameter, e.g. /update?password=test.

Deploying your own blog

Fork this repository & set your dev.to username in consts.ts and a password in actions secrets.

Then generate an API token and set CF_API_TOKEN and CF_ACCOUNT_ID in actions secrets as well. The deploy action will automatically deploy via Wrangler.

Releases

No releases published

Packages

No packages published