I cannot find a quick way to clone a Worker already deployed (such those created from the online dashboard). Is there a command similar to git clone, to obtain a local copy?
There are no references in the docs.
Update: Now there is a way:
npm create cloudflare@2 <original-worker-name> -- --type pre-existing
this copies the original code, and creates everything you need to develop locally.
I didn't find it because it was inside the npm create command, which I wasn't looking for.
The wrangler init command, used to initialize a new Worker project, provides an argument called from-dash which could be used to obtain a Worker initialized from the dashboard.
Usage: wrangler init --from-dash <WORKER_NAME>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With