Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.
/ refresh Public archive

Scheduled Cloudflare worker that summarizes analytics database in a single JSON file

License

Notifications You must be signed in to change notification settings

nolytics/refresh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

refresh

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

Development

Run the local server via npm run start

Trigger an instant cronjob via curl "http://localhost:8787/__scheduled?cron=*+*+*+*+*"

Deploy

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

About

Scheduled Cloudflare worker that summarizes analytics database in a single JSON file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published