feat: add staging environment for Netcup deployment
- Update workerUrl.ts to support staging/dev environments pointing to Cloudflare dev worker - 'staging' and 'dev' now use jeffemmett-canvas-automerge-dev worker - 'local' still uses localhost:5172 for local development - Set VITE_WORKER_ENV=staging when building for Netcup staging 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
f9208719b0
commit
cf554986a1
|
|
@ -2,15 +2,17 @@
|
|||
// You can easily switch between environments by changing the WORKER_ENV variable
|
||||
|
||||
// Available environments:
|
||||
// - 'local': Use local worker running on port 5172
|
||||
// - 'dev': Use Cloudflare dev environment (jeffemmett-canvas-automerge-dev)
|
||||
// - 'production': Use production environment (jeffemmett-canvas)
|
||||
// - 'local': Use local worker running on port 5172 (for local development)
|
||||
// - 'dev': Use Cloudflare dev worker (jeffemmett-canvas-automerge-dev)
|
||||
// - 'staging': Use Cloudflare dev worker (same as dev, for Netcup staging)
|
||||
// - 'production': Use production worker (jeffemmett-canvas)
|
||||
|
||||
const WORKER_ENV = import.meta.env.VITE_WORKER_ENV || 'production' // Default to production
|
||||
|
||||
const WORKER_URLS = {
|
||||
local: `http://${window.location.hostname}:5172`,
|
||||
dev: `http://${window.location.hostname}:5172`,
|
||||
dev: "https://jeffemmett-canvas-automerge-dev.jeffemmett.workers.dev",
|
||||
staging: "https://jeffemmett-canvas-automerge-dev.jeffemmett.workers.dev",
|
||||
production: "https://jeffemmett-canvas.jeffemmett.workers.dev"
|
||||
}
|
||||
|
||||
|
|
@ -26,6 +28,7 @@ export const getWorkerInfo = () => ({
|
|||
url: WORKER_URL,
|
||||
isLocal: WORKER_ENV === 'local',
|
||||
isDev: WORKER_ENV === 'dev',
|
||||
isStaging: WORKER_ENV === 'staging',
|
||||
isProduction: WORKER_ENV === 'production'
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue