Wranglers generate command, wrangler generate
, allows you to create new Cloudflare Workers projects. Using the URL parameter, you can also generate new projects based on Cloudflare's starter templates, or open-source projects created by other developers, but for now, you will just use the default. To do this you'll only need to give it a name, for example, wrangler generate my-worker
, this will create a new project called my-worker.
In case the login doesn't work for someone, please try these steps instead.
Use wrangler login
to open login link.
Press F12, then switch it to network tab.
Press "Authorize Wrangler", then wait it success.
Check the lastest request, find a request like https://dash.cloudflare.com/api/v4/user/tokens/SOME_HEX_STRING_HERE/value
, then find your API token in the response.
Run command wrangler config
, paste the API token into it and press Enter, then you will get "Successfully configured. You can find your configuration file at: ..."
https://github.com/cloudflare/wrangler/issues/1703