1.1 KiB
1.1 KiB
Overview
This directory provides a storage-manager built on Cloudflare workers that manages objects stored on Cloudflare R2
Building
You'll need Node.js. If you use nvm run
nvm use
To install dependencies,
npm install
In order to deploy to Cloudflare or use non-local development mode, use the wrangler utility. Follow those instructions to authenticate with your Cloudflare account.
Testing
To run a development server you can interact with over localhost:
npx wrangler dev
To run unit tests,
npm test
Deploying
One time setup
Create R2 buckets and update the bindings in wrangler.toml.
Set the GCS bucket to use, either by setting a variable in wrangler.toml
[vars]
GCS_BUCKET = <your GCS bucket>
or using a wrangler secret
wrangler secret put GCS_BUCKET [-e <staging | production>]
then:
wrangler deploy -e <staging|production>