diff --git a/packages/landing/.gitignore b/packages/landing/.gitignore index 16d54bb1..4610b01f 100644 --- a/packages/landing/.gitignore +++ b/packages/landing/.gitignore @@ -22,3 +22,9 @@ pnpm-debug.log* # jetbrains setting folder .idea/ + +# wrangler files +.wrangler +.dev.vars* +!.dev.vars.example +!.env.example diff --git a/packages/landing/astro.config.mjs b/packages/landing/astro.config.mjs index 0165b0ec..1e25a79a 100644 --- a/packages/landing/astro.config.mjs +++ b/packages/landing/astro.config.mjs @@ -4,6 +4,8 @@ import rehypeExternalLinks from 'rehype-external-links'; import sitemap from '@astrojs/sitemap'; +import cloudflare from '@astrojs/cloudflare'; + // https://astro.build/config export default defineConfig({ site: 'https://chorus-ai.dev', @@ -24,4 +26,5 @@ export default defineConfig({ }, integrations: [sitemap()], + adapter: cloudflare(), }); \ No newline at end of file diff --git a/packages/landing/package.json b/packages/landing/package.json index 687587c1..015b3042 100644 --- a/packages/landing/package.json +++ b/packages/landing/package.json @@ -9,12 +9,21 @@ "scripts": { "dev": "astro dev", "build": "astro build", - "preview": "astro preview", - "astro": "astro" + "preview": "npm run build && wrangler dev", + "astro": "astro", + "generate-types": "wrangler types", + "deploy": "npm run build && wrangler deploy" }, "dependencies": { + "@astrojs/cloudflare": "^13.1.10", "@astrojs/sitemap": "^3.7.2", "astro": "^6.1.4", "rehype-external-links": "^3.0.0" + }, + "devDependencies": { + "wrangler": "^4.83.0" + }, + "overrides": { + "vite": "^7" } } diff --git a/packages/landing/public/.assetsignore b/packages/landing/public/.assetsignore new file mode 100644 index 00000000..1b006a0f --- /dev/null +++ b/packages/landing/public/.assetsignore @@ -0,0 +1,2 @@ +_worker.js +_routes.json \ No newline at end of file diff --git a/packages/landing/tsconfig.json b/packages/landing/tsconfig.json index 8bf91d3b..41f5e7f2 100644 --- a/packages/landing/tsconfig.json +++ b/packages/landing/tsconfig.json @@ -1,5 +1,11 @@ { "extends": "astro/tsconfigs/strict", - "include": [".astro/types.d.ts", "**/*"], - "exclude": ["dist"] -} + "include": [ + ".astro/types.d.ts", + "**/*", + "./worker-configuration.d.ts" + ], + "exclude": [ + "dist" + ] +} \ No newline at end of file diff --git a/packages/landing/wrangler.jsonc b/packages/landing/wrangler.jsonc new file mode 100644 index 00000000..a4180b7b --- /dev/null +++ b/packages/landing/wrangler.jsonc @@ -0,0 +1,13 @@ +{ + "compatibility_date": "2026-04-18", + "compatibility_flags": ["global_fetch_strictly_public"], + "name": "chorus-landing", + "main": "@astrojs/cloudflare/entrypoints/server", + "assets": { + "directory": "./dist", + "binding": "ASSETS" + }, + "observability": { + "enabled": true + } +} \ No newline at end of file