phlareact

Phlareact: Preact meets Flareact

Deploy to Cloudflare WorkersDeploy 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.


1. Install Wrangler

yarn global add @cloudflare/wrangler

2. Generate a New Project

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


3. Add account_id to wrangler.toml

You can find account_id in the sidebar of your site’s Cloudflare Dashboard.


4. Start development server

 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!


5. Publish to Cloudflare Workers

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


Acknowledgements

Based on the original Flareact Template.