An open API service indexing awesome lists of open source software.

https://github.com/oxy86/cf-react

Tutorial project to use Cloudflare Workers to deploy and serve a full static site developed in React, serverless.
https://github.com/oxy86/cf-react

cloudflare create-react-app react serverless workers wrangler

Last synced: 2 months ago
JSON representation

Tutorial project to use Cloudflare Workers to deploy and serve a full static site developed in React, serverless.

Awesome Lists containing this project

README

          

# Serverless React app on Cloudflare Workers

In this example project, we use [Wrangler](https://github.com/cloudflare/wrangler) and [Cloudflare Workers](https://developers.cloudflare.com/workers/get-started/guide) to deploy and serve a static site developed in [React](https://reactjs.org/) (bootstrapped with [Create React App](https://github.com/facebook/create-react-app)).

Cloudflare Workers is a great platform to deploy static sites: the application will be distributed to hundrends of locations around the world, and served directly from Cloudflare’s CDN at a server incredibly close to your users.

For a step-by-step tutorial to reproduce this project, read my blog post:

[Serverless: How to create and serve a static React site directly from Cloudflare’s CDN using Workers](https://dimitris.apeiro.gr/2021/07/17/serverless-how-to-create-and-serve-a-static-react-site-directly-from-cloudflares-cdn-using-workers/)

Alternatively, if you already have signed up for a CF Workers account, installed Node.js and the `wrangler` tool, you can just clone this repo in your local computer, edit `wrangler.toml` to update it your CF account id, then

`npm build`

and

`wrangler publish`

to publish it. Just like that, you will have your serverless React app running on Cloudflare.