— Deploy to Cloudflare Workers in 5 minutes or less.
Not a fan of GUIs? With the Wrangler CLI you can manage your Workers from the command line.
yarn global add @cloudflare/wrangler
Once Wrangler has installed and authenticated your account, you can now tell Wrangler to generate a new project from this template repository. my-project
can be any name you want, and that will be the working directory that's created for your new project.
wrangler generate my-project https://github.com/nberlette/phlareact
-
Open your favorite text editor and fill in
account_id
andname
insidewrangler.toml
. I'm working on a helper script to eliminate this manual step from the process. -
The
name
field will be your desired subdomain onworkers.dev
(as long asworkers_dev = true
).
You can find account_id in the sidebar of your site's Cloudflare Dashboard.
cd my-project && yarn dev
Spool up the Wrangler Development Server and enjoy the hot reloading as you work! You can add/edit files in the pages/
folder and watch the changes take effect in real time.
Note: don't run
wrangler dev
or it will skip the Flareact portion of the script!
Once you're satisfied with your project's progress, and want to see how it performs in deployment, simply run the following command to publish your site:
yarn publish
Based on the original Flareact Template.