https://developers.cloudflare.com/workers/about/how-it-works/
- goto workers.dev to create your account
- create a cloudflare account, verify your account thru email (IMPORTANT)
after registration you are prompted to add a site
- when prompted to add a site, click the menu and go back to home or the dashboard we are skipping this step
- click workers, which will let you setup a free worker subdomain
- eg typing
example
would give your account control to the content onexample.workers.dev
- eg typing
after creating subdomain goback to your dashboard from main menu
access your profile in the upper right corner, goto api tokens
- click
view
next to global api key - enter your password
- copy your global api key to your text editor or somewhere you wont forget
npm install -g @cloudflare/wrangler
wrangler generate my-worker # this creates a folder, my-worker
# if that doesnt work run the next line then try again
# git config url."git://".insteadOf "https://"
cd my-worker
wrangler config
# - prompted for email, enter it
# - promoted for api key, enter it
# - finally, edit `wrangler.toml` to add your account id
# - this is the hash in your cloudinary account url URL in the browser dashboard
# - looks something like dash.cloudflare.com/173492837asjkl where 173492837asjkl is your account id
# save file
wrangler whoami # should come back with a success message