Is there a way to combine dev and prod workers projects?

Pages has preview and prod environments. Can we do the same for workers projects?
3 Replies
Jürgen Leschner
Hi @Gagan Suie there's an example of configuring worker environments in https://developers.cloudflare.com/workers/wrangler/environments/
Cloudflare Docs
Environments | Cloudflare Workers docs
Deploy the same Worker application with different configuration for each environment.
Gagan Suie
Gagan Suie5w ago
Hi, thanks for this. But I'm asking if there's a way to combine environments instead of having separate projects in workers dashboard. Similar to how cloudflare pages is setup.
Jürgen Leschner
aah, right, workers for each wrangler environment have different names and show up separately in the workers dashboard. I haven't tried it yet, but there is a new experimental "versions & deployments" feature which lets you deploy and route traffic to different versions. That might be a cleaner way to do staged worker testing. https://developers.cloudflare.com/workers/configuration/versions-and-deployments
Cloudflare Docs
Versions & Deployments | Cloudflare Workers docs
Upload versions of Workers and create deployments to release new versions.
Want results from more Discord servers?
Add your server