image management for my s3 bucket (aka backblaze b2). i will write a proper readme later but for now.
clone this repo, run bun install, make a .env with the following:
# Backblaze B2 Configuration
B2_ACCESS_KEY_ID=""
B2_SECRET_ACCESS_KEY=""
B2_BUCKET_NAME=""
B2_ENDPOINT="https://s3.us-east-005.backblazeb2.com/$B2_BUCKET_NAME"
B2_REGION=us-east-005
# Github
GITHUB_CLIENT_SECRET=""
GITHUB_CLIENT_ID=""
JWT_SECRET="generate with `openssl rand -hex 32`"edit line 27 of server/lib/auth.ts to the github organization you want to restrict access to. i will make this better i promise.
then run bun deploy to build and deploy the worker.
then run bun wrangler secret bulk .env to bulk upload the secrets to cloudflare workers.
A markdown pastebin is now included. Pastes render with markdown-it and are stored in Cloudflare KV. Configure a KV namespace and wire it up before deploying:
wrangler kv:namespace create "untitled-pastes"
wrangler kv:namespace create --preview "untitled-pastes"Take the generated IDs and drop them into the PASTES binding in wrangler.jsonc (replace the PASTES_KV_ID placeholders). Once configured, authenticated users can open the “paste” button in the header to draft markdown, choose an expiration, and share the generated /p/{id} link.