Skip to content

๐Ÿˆ Silly Cloudflare Worker that returns a cat picture each day.

License

Notifications You must be signed in to change notification settings

i40west/dailycat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

20 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

dailycat

Just a silly Cloudflare Worker, written with ChatGPT, that returns a cat picture, and renews that picture each day from The Cat API.

Hit /cat to get a cat picture.

Expects an API key in a CAT_API_KEY environment variable. You can put it there with wrangler secret put CAT_API_KEY with the variable set in .dev.vars. There is a cron trigger to hit the API once per day.

Expects a KV namespace bound to env.meow. You can do this in the Cloudflare dashboard, or with wrangler kv:namespace create "meow". The wrangler.toml file should be configured with the namespace ID.

Your Cloudflare account ID also needs to be in wrangler.toml.

If you don't like today's cat, send a GET request to /renew to make it fetch a new one.

The / path returns an error, to dissuade freeloaders.

Meow. ๐Ÿˆ

About

๐Ÿˆ Silly Cloudflare Worker that returns a cat picture each day.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published