CDN worker for Cloudflare Workers.
- NodeJS
- Cloudflare Wrangler
- Transcrypt
- gettext
For a fresh ubuntu you can install the above with:
bash <(curl -sL https://deb.nodesource.com/setup_14.x)
apt install nodejs
npm i @cloudflare/wrangler -g --unsafe-perm=true --allow-root
pip install --user transcrypt
Cloudflare Account setup:
-
Create an API key for your account with at least below permissions. You can use Edit Cloudflare Workers template.
- Account.Workers KV Storage
- Account.Workers Scripts
- Account.Account Settings
- User.User Details
- Zone.Workers Routes
-
Enable Cloudflare Workers Bundled plan if you need.
Cloudflare Worker setup:
-
Go to the repository
-
Copy
.env.template
to.env
and set your configuration therecp .env.template .env
-
Publish the worker (the .env must loaded by your shell):
envsubst < wrangler.toml.template > wrangler.toml wrangler publish