Warning: This project has been abandoned in favor of the Clock Edge App.
This is an example asset for Screenly as part of the Screenly Playground.
You can view the live demo at clock.srly.io. The clock detects the viewer's location at the Cloudflare edge (country + timezone) and displays the correct local time, in the local 12/24-hour format and language.
This project uses Bun as its package manager. Install dependencies with:
bun installThis installs Wrangler locally. Run it via bunx wrangler (or install it globally with bun add -g wrangler).
Login to Cloudflare
bunx wrangler loginRun the project in dev mode
bun run devLint and test
bun run lint
bun testBuild the static assets (vendors webfonts, then minifies JS/CSS in place)
bun run buildDeploy worker
bunx wrangler deploy --env [environment name]