Cloudflare Workers: Two scripts, please. One for staging. One for production



Hello! As our Cloudflare Worker becomes more complex with frequent updates, my patience is running thin for having to manually copy & paste the script into the playground to test before overwriting the current script that’s in production.

Before I deploy the worker to production via curl using the Cloudflare API, my workflow is to bundle together NodeJS modules using webpack, test development builds using Chrome DevTools, then test production builds in the playground. (I use the Playground instead of my dashboard’s Editor because I don’t want to accidentally disrupt the script that’s in production.)

Would the folks at Cloudflare consider offering Cloudflare Workers customers precisely two scripts: one script for production, and another for staging?

Two scripts could also give us a taste of what the multiple scripts interface is like in an Enterprise plan, because right now I’m not sure what that UI looks like or whether an API endpoint exists for uploading different scripts.


Meanwhile, to speed things up I’m using Terraform and WebPack.

Also npm run preview


I would like to see more Workers as well, not only for staging and production. We have code in GitHub repositories which are project related. With one only Worker, we have all code into a single repository, where everybody can edit about everything.

And yes, mixing staging and production is an absolute no-go.