Skip to content

Commit adb35f5

Browse files
Add Cloudflare Workers configuration
1 parent e6e6fa3 commit adb35f5

6 files changed

Lines changed: 44 additions & 5 deletions

File tree

packages/landing/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,9 @@ pnpm-debug.log*
2222

2323
# jetbrains setting folder
2424
.idea/
25+
26+
# wrangler files
27+
.wrangler
28+
.dev.vars*
29+
!.dev.vars.example
30+
!.env.example

packages/landing/astro.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import rehypeExternalLinks from 'rehype-external-links';
44

55
import sitemap from '@astrojs/sitemap';
66

7+
import cloudflare from '@astrojs/cloudflare';
8+
79
// https://astro.build/config
810
export default defineConfig({
911
site: 'https://chorus-ai.dev',
@@ -24,4 +26,5 @@ export default defineConfig({
2426
},
2527

2628
integrations: [sitemap()],
29+
adapter: cloudflare(),
2730
});

packages/landing/package.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,21 @@
99
"scripts": {
1010
"dev": "astro dev",
1111
"build": "astro build",
12-
"preview": "astro preview",
13-
"astro": "astro"
12+
"preview": "npm run build && wrangler dev",
13+
"astro": "astro",
14+
"generate-types": "wrangler types",
15+
"deploy": "npm run build && wrangler deploy"
1416
},
1517
"dependencies": {
18+
"@astrojs/cloudflare": "^13.2.0",
1619
"@astrojs/sitemap": "^3.7.2",
1720
"astro": "^6.1.4",
1821
"rehype-external-links": "^3.0.0"
22+
},
23+
"devDependencies": {
24+
"wrangler": "^4.84.1"
25+
},
26+
"overrides": {
27+
"vite": "^7"
1928
}
2029
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
_worker.js
2+
_routes.json

packages/landing/tsconfig.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
{
22
"extends": "astro/tsconfigs/strict",
3-
"include": [".astro/types.d.ts", "**/*"],
4-
"exclude": ["dist"]
5-
}
3+
"include": [
4+
".astro/types.d.ts",
5+
"**/*",
6+
"./worker-configuration.d.ts"
7+
],
8+
"exclude": [
9+
"dist"
10+
]
11+
}

packages/landing/wrangler.jsonc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"compatibility_date": "2026-04-23",
3+
"compatibility_flags": ["global_fetch_strictly_public"],
4+
"name": "chorus-landing",
5+
"main": "@astrojs/cloudflare/entrypoints/server",
6+
"assets": {
7+
"directory": "./dist",
8+
"binding": "ASSETS"
9+
},
10+
"observability": {
11+
"enabled": true
12+
}
13+
}

0 commit comments

Comments
 (0)