latest update to fix cloudflare

This commit is contained in:
Jeff Emmett 2025-11-10 11:51:57 -08:00
parent 256dfa2110
commit 4894f1e439
14 changed files with 49 additions and 3 deletions

37
CLOUDFLARE_PAGES_SETUP.md Normal file
View File

@ -0,0 +1,37 @@
# Cloudflare Pages Configuration
## Issue
Cloudflare Pages cannot use the same `wrangler.toml` file as Workers because:
- `wrangler.toml` contains Worker-specific configuration (main, account_id, triggers, etc.)
- Pages projects have different configuration requirements
- Pages cannot have both `main` and `pages_build_output_dir` in the same file
## Solution: Configure in Cloudflare Dashboard
Since `wrangler.toml` is for Workers only, configure Pages settings in the Cloudflare Dashboard:
### Steps:
1. Go to [Cloudflare Dashboard](https://dash.cloudflare.com/)
2. Navigate to **Pages** → Your Project
3. Go to **Settings** → **Builds & deployments**
4. Configure:
- **Build command**: `npm run build`
- **Build output directory**: `dist`
- **Root directory**: `/` (or leave empty)
5. Save settings
### Alternative: Use Environment Variables
If you need to configure Pages via code, you can set environment variables in the Cloudflare Pages dashboard under **Settings****Environment variables**.
## Worker Deployment
Workers are deployed separately using:
```bash
npm run deploy:worker
```
or
```bash
wrangler deploy
```
The `wrangler.toml` file is used only for Worker deployments, not Pages.

View File

@ -134,5 +134,6 @@ The Fathom transcript shape includes:

View File

@ -85,5 +85,6 @@ You can also manually edit the environment by:

View File

@ -262,5 +262,6 @@ export const LocationDashboard: React.FC = () => {

View File

@ -233,5 +233,6 @@ export const LocationMap: React.FC<LocationMapProps> = ({

View File

@ -175,5 +175,6 @@ export const LocationViewer: React.FC<LocationViewerProps> = ({ shareToken }) =>

View File

@ -142,5 +142,6 @@ export const ShareSettingsComponent: React.FC<ShareSettingsProps> = ({ onSetting

View File

@ -417,5 +417,6 @@

View File

@ -47,5 +47,6 @@ export interface GeolocationPosition {

View File

@ -29,5 +29,6 @@ export const LocationDashboardRoute: React.FC = () => {

View File

@ -29,5 +29,6 @@ export const LocationShareCreate: React.FC = () => {

View File

@ -43,5 +43,6 @@ export const LocationShareView: React.FC = () => {

View File

@ -64,5 +64,6 @@ echo " npm run dev"

View File

@ -3,9 +3,6 @@ compatibility_date = "2024-07-01"
name = "jeffemmett-canvas"
account_id = "0e7b3338d5278ed1b148e6456b940913"
# Cloudflare Pages configuration
pages_build_output_dir = "dist"
[vars]
# Environment variables are managed in Cloudflare Dashboard
# Workers & Pages → jeffemmett-canvas → Settings → Variables