Repository navigation
feat(hosting): move the site from Vercel to Cloudflare Workers - #105
Merged
Merged
Conversation
The site now runs on Cloudflare Workers through the OpenNext adapter (@opennextjs/cloudflare). Next.js stays; only the host changes. - Workers have no file system: posts, guides, SVG sizes and the share image logo are packed into the bundle at build time (scripts/bundle-site-files.mjs, run by predev/prebuild). - A Worker cannot reuse a socket opened by another request, so each request opens its own MongoDB connection and models follow it (lib/db.ts, lib/impact-db.ts, lib/model.ts). Node behaves as before. - worker.ts adds the daily feed cron (replaces vercel.json) and a permanent 308 from devweekends.com to www. - Next.js cache on R2 with Durable Objects for revalidation; the Worker runs in Mumbai, next to the database. - SITE_ENV replaces VERCEL_ENV. Next.js 15.5.15 -> 15.5.29 (OpenNext minimum). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
devweekends.com now runs on Cloudflare Workers (OpenNext adapter) instead of Vercel. It is already live from this branch; this PR brings
mainin line.Changes
scripts/bundle-site-files.mjs, viapredev/prebuild).lib/db.ts,lib/impact-db.ts,lib/model.ts). Under Node (dev, build, Vercel) nothing changes.worker.ts: daily LinkedIn feed cron (replacesvercel.json) and a permanent 308 fromdevweekends.comtowww.SITE_ENVreplacesVERCEL_ENV. Next.js 15.5.15 → 15.5.29 (minimum for OpenNext).Checked
llms-full.txt, share image, image resizing, redirects and security headers on the live domain.wrangler secret), and.env,.dev.vars, the build output and the generated bundle are git-ignored.Deploying
npm run deploy(needsCLOUDFLARE_ACCOUNT_IDin.env), or Cloudflare Workers Builds frommain.🤖 Generated with Claude Code