Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gallery Worker

Cloudflare Worker that backs the TechnoVIT gallery: lists images stored in R2 and hands back their public CDN URLs, served behind one HTTP API.

What it does

  • GET /gallery: lists every object under the special/ and general/ prefixes in the techno-gallery R2 bucket, and returns each as { url, isSpecial }, where url points at the public CDN host (gallery.techno.cdn.a2ys.dev). CORS is open for GET/OPTIONS from any origin.
  • Any other path returns a plain-text GALLERY API is running — a basic health check.

The worker itself never serves image bytes; it only lists what's in the bucket and builds the URL each image is already reachable at through the CDN.

Stack

  • Cloudflare Workers (JavaScript)
  • R2 for image storage

Getting started

npm install
npm run dev      # wrangler dev
npm run deploy   # wrangler deploy

wrangler.toml binds the techno-gallery R2 bucket as GALLERY_BUCKET and routes api.techno.cdn.a2ys.dev/* (zone a2ys.dev) to this worker.

Scripts

  • npm run dev — local dev via wrangler dev
  • npm run deploy — deploy to Cloudflare

About

Cloudflare Worker that backs the TechnoVIT gallery: lists images stored in R2 and hands back their public CDN URLs, served behind one HTTP API.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages