Skip to content

Port from Vercel to Cloudflare Workers - #31

Merged
jmduke merged 4 commits into
mainfrom
jmduke/vercel-to-cloudflare-port
Oct 28, 2026
Merged

jmduke merged 4 commits into
mainfrom
jmduke/vercel-to-cloudflare-port

Conversation

@jmduke

@jmduke jmduke commented Oct 28, 2026

Copy link
Copy Markdown
Member

Summary

  • Deploy to Cloudflare Workers with the OpenNext adapter (@opennextjs/cloudflare). Remove vercel.json.
  • Upgrade next to ^16.4.1. The adapter requires it.
  • Cache /api/merge with the Workers Cache API. Cloudflare does not cache Worker responses at the edge, so without this each feed-reader poll fetches all upstream feeds.
  • Add preview, deploy, and cf-typegen scripts.

Test plan

  • bun test passes (19 tests).
  • bun run preview: /, /sitemap.xml, and /api/merge (RSS and JSON) work. The second request returns CF-Cache-Status: HIT.
  • Deployed to https://rssrssrss.justin-05a.workers.dev and checked the same routes.
  • Move rssrssrssrss.com DNS to Cloudflare and attach the Worker custom domain.

🤖 Generated with Claude Code

Use the OpenNext Cloudflare adapter, which requires Next 16.4.1+.
Cache /api/merge with the Workers Cache API, since Cloudflare does not
cache Worker responses at the edge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
rssrssrssrss Ready Ready Preview Oct 28, 2026 11:47am UTC

Request Review

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jmduke and others added 2 commits October 28, 2026 07:38
OpenNext added per-request CPU and stalled responses. The page is now
static assets built by Vite, and src/worker.ts serves /api/merge.

The Cache API has no stale-while-revalidate, so the Worker serves stale
merged feeds and refreshes them in waitUntil. Each upstream feed is cached
for 10 minutes, and a deadline now covers slow response bodies, which
the abort signal does not stop in Workers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vercel built and deployed each push. Now CI runs a typecheck and a build,
and pushes to main deploy with wrangler. Remove the unused Next.js
template SVGs, and add the og-image.png that index.html refers to.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jmduke
jmduke merged commit b0b1c93 into main Oct 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant