A dashboard for managing Cloudflare Workers.
-
(On MacOS with Homebrew:
brew install cloudflare/cloudflare/cloudflared
)
npm i
These should all be self-explanatory:
-
npm run lint
npm run lint:fix
-
npm run test
npm run test:client
npm run test:server
-
npm run deploy
To start a local version:
-
In one terminal window, run
npm run start:client
. -
In another, run
npm run start
and navigate to http://localhost:8787.
-
/packages/client
is simply a CRA created withnpx create-react-app . --template typescript --use-npm
. -
/packages/server
an function which intercepts a request to the client. If it returns a 404, the request is passed through to the client. -
/packages/worker
attempts to fetch from the server first, falling back on the client.