Readme

Daily Dad Joke

How do you make a programmer laugh every morning?

A dad joke cron job!

Setup

  1. Fork this val
  2. Click Create fork
  3. 🤣🤣🤣🤣

API

This val uses the icanhazdadjoke API. You can find more docs here, such as how to filter by type.

1
2
3
4
5
6
7
8
9
10
import { email } from "https://esm.town/v/std/email";
import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
export async function dailyDadJoke() {
let { setup, punchline } = await fetchJSON("https://official-joke-api.appspot.com/random_joke");
return email({
text: punchline,
subject: setup,
});
}
👆 This is a val. Vals are TypeScript snippets of code, written in the browser and run on our servers. Create scheduled functions, email yourself, and persist small pieces of data — all from the browser.