Scheduled Cloudflare worker that summarizes analytics database in a single JSON file.
This worker was bootstrapped and configured with wrangler CLI. You can install it via NPM: npm install -g wrangler
Run the local server via npm run start
Trigger an instant cronjob via curl "http://localhost:8787/__scheduled?cron=*+*+*+*+*"
Setup worker environment variables with the following one-line:
IFS='='; ENV_FILE=.dev.vars; cat $ENV_FILE | while read line || [[ -n $line ]]; do read -ra envy <<< $line; wrangler secret put ${envy[0]} <<< ${envy[1]} ; done
Deploy to Cloudflare via npm run deploy