Before deploying to cloudflare pages with wrangler you need a cloudflare api
token. You can get one at
dash.cloudflare.com/profile/api-tokens [1].
[2]
Install Wrangler # [3]
Next install wrangler using npm.
npm i -g wrangler
Create a Project # [4]
Before you deploy to cloudflare pages you need to create a project. You might
already have one, or you might want to create one in the webui, but you have
the option to create it at the command line with wrangler.
npx wrangler pages deploy markout --project-name reader-waylonwalker-com --branch markout
Deploy # [5]
Now you can deploy your static application using wrangler to cloudflare pages.
In this example I have my application built into the markout directory, and
since the production branch is named markout I need to pass that in here as
well.
wrangler pages deploy markout --project-name reader-waylonwalker-com --branch markout
References:
[1]: https://dash.cloudflare.com/profile/api-tokens
[2]: https://dropper.waylonwalker.com/api/file/7b566e55-98ff-4d96-b0bc-3c4e5b619d68.png
[3]: #install-wrangler
[4]: #create-a-project
[5]: #deploy
Posts tagged: cloudflare
All posts with the tag "cloudflare"
1 posts
latest post 2024-04-09