Cloudflare worker that generates bitmap images to display on a 800x480 screen.
Images are generated from a template SVG file using resvg.
Weather data shown on the bitmap is gathered from Pirate Weather. Bus arrival times are gathered from the NJ Transit API (reverse engineered from the Android app).
- Update your
account_id
inwrangler.toml
. npx wrangler r2 bucket create <name>
- Create two Cloudflare R2 buckets for production/development.
- Update
wrangler.toml
with the bucket names. - Upload
template.svg
and the fonts infonts/
to the buckets. - Add
PIRATE_WEATHER_API_KEY=<key>
to.dev.vars
.- Set the API key for the Pirate Weather API in development.
npx wrangler secret put PIRATE_WEATHER_API_KEY
- Set the API key for the Pirate Weather API in productino.
Run npx wrangler dev --remote
to run the development server.
Remote is needed to access the files stored in the R2 bucket.
Run npx wrangler deploy
to publish the worker to production.