Generates an Cloudflare Worker API endpoint that can be used to encode and decode data in base64.
index.js is the interesting file with all of the Javascript to make the worker run.
wrangler.toml.example is a template configuration file for the worker.
wrangler.toml configuration instructions may be found on the Cloudflare Developer Portal.
To get this code running on your own free Cloudflare account I recommend following their worker quickstart guide.
- Install Wrangler:
npm install -g @cloudflare/wrangler
- Login to your account:
wrangler login
- Clone this repo:
git clone https://github.com/JAKONL/base64 /Path/To/Your/Worker/Directory
cd
into the directory:cd /Path/To/Your/Worker/Directory
- Run
wrangler init
to create a new wrangler.toml file. - Run
wrangler dev
to start the development server.
Cloudflare worker documentation for Wrangler can be found here.