Skip to content

Commit e9ace8a

Browse files
ChanMeng666claude
andcommitted
feat(deploy): migrate from Vercel to Cloudflare Workers
- Add @opennextjs/cloudflare and wrangler dependencies - Create wrangler.jsonc for Cloudflare Worker configuration - Create open-next.config.ts for OpenNext Cloudflare settings - Convert next.config.js to ESM with standalone output - Add preview and deploy scripts for Cloudflare deployment - Update all URLs from send-joy.vercel.app to sendjoy.chanmeng-dev.workers.dev - Add .open-next and .dev.vars to .gitignore Deployed at: https://sendjoy.chanmeng-dev.workers.dev Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent dba12bc commit e9ace8a

14 files changed

Lines changed: 18652 additions & 6102 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@ Thumbs.db
3535
# Claude Code
3636
.claude/
3737
nul
38+
39+
# Cloudflare
40+
.open-next
41+
.dev.vars

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ send-joy/
539539
| [![][demo-shield-badge]][demo-link] | No installation required! Start using SendJoy immediately. |
540540
| :---------------------------------- | :---------------------------------------------------------- |
541541

542-
1. Visit **[https://send-joy.vercel.app/](https://send-joy.vercel.app/)**
542+
1. Visit **[https://sendjoy.chanmeng-dev.workers.dev/](https://sendjoy.chanmeng-dev.workers.dev/)**
543543
2. Go to **Settings** and enter your Resend API Key
544544
3. Add your contacts (manually, CSV, or sync from Resend)
545545
4. Choose a template and customize it
@@ -1224,7 +1224,7 @@ A: SendJoy is a web application with responsive design. It works well on tablets
12241224
[back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square
12251225

12261226
<!-- Project Links -->
1227-
[demo-link]: https://send-joy.vercel.app/
1227+
[demo-link]: https://sendjoy.chanmeng-dev.workers.dev/
12281228
[github-issues-link]: https://github.com/ChanMeng666/send-joy/issues
12291229
[github-stars-link]: https://github.com/ChanMeng666/send-joy/stargazers
12301230
[github-forks-link]: https://github.com/ChanMeng666/send-joy/forks

TUTORIAL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ You can access SendJoy in two ways:
2323

2424
**Option A: Use the Live Version (Recommended)**
2525

26-
Simply visit: **[https://send-joy.vercel.app/](https://send-joy.vercel.app/)**
26+
Simply visit: **[https://sendjoy.chanmeng-dev.workers.dev/](https://sendjoy.chanmeng-dev.workers.dev/)**
2727

2828
No installation or download required!
2929

app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414

1515
const inter = Inter({ subsets: ['latin'] })
1616

17-
const baseUrl = 'https://send-joy.vercel.app'
17+
const baseUrl = 'https://sendjoy.chanmeng-dev.workers.dev'
1818

1919
export const metadata: Metadata = {
2020
metadataBase: new URL(baseUrl),

app/sitemap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { MetadataRoute } from 'next'
22

3-
const baseUrl = 'https://send-joy.vercel.app'
3+
const baseUrl = 'https://sendjoy.chanmeng-dev.workers.dev'
44

55
export default function sitemap(): MetadataRoute.Sitemap {
66
// Static routes

components/geo/GEOHead.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ ${finalAlternatives.join(', ')}
6363
6464
## Platform
6565
SendJoy - Free, open-source email template platform
66-
URL: https://send-joy.vercel.app/
66+
URL: https://sendjoy.chanmeng-dev.workers.dev/
6767
6868
## Quick Facts
6969
- No coding required (drag-and-drop editor)

lib/geo/schemas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const baseUrl = 'https://send-joy.vercel.app'
1+
const baseUrl = 'https://sendjoy.chanmeng-dev.workers.dev'
22

33
/**
44
* Organization schema for SendJoy brand identity

next.config.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
1+
import { initOpenNextCloudflareForDev } from "@opennextjs/cloudflare";
2+
3+
initOpenNextCloudflareForDev();
4+
15
/** @type {import('next').NextConfig} */
26
const nextConfig = {
3-
// 启用实验性功能以支持 React 19
7+
output: 'standalone',
48
experimental: {
59
serverActions: {
610
bodySizeLimit: '2mb',
711
},
812
},
9-
// 允许外部图片域名
1013
images: {
14+
unoptimized: true,
1115
remotePatterns: [
1216
{
1317
protocol: 'https',
14-
hostname: 'lxd4dc8r8oetlgua.public.blob.vercel-storage.com',
18+
hostname: '**',
1519
},
1620
],
1721
},
1822
}
1923

20-
module.exports = nextConfig
24+
export default nextConfig

open-next.config.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import type { OpenNextConfig } from "@opennextjs/cloudflare";
2+
3+
const config: OpenNextConfig = {
4+
default: {
5+
override: {
6+
wrapper: "cloudflare-node",
7+
converter: "edge",
8+
proxyExternalRequest: "fetch",
9+
incrementalCache: "dummy",
10+
tagCache: "dummy",
11+
queue: "dummy",
12+
},
13+
},
14+
edgeExternals: ["node:crypto"],
15+
middleware: {
16+
external: true,
17+
override: {
18+
wrapper: "cloudflare-edge",
19+
converter: "edge",
20+
proxyExternalRequest: "fetch",
21+
},
22+
},
23+
};
24+
25+
export default config;

0 commit comments

Comments
 (0)