1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export let getDadJoke = () => fetchJSON("https://official-joke-api.appspot.com/random_joke");
5app.get("/", (c) => c.text("Hello world!"));
6app.get("/edit", (c) => editRedirect());
7export default app.fetch;
12app.get("/", (c) => c.text("Hello world!"));
13app.get("/edit", (c) => editRedirect());
14export default app.fetch;
15```
16
1import { email } from "https://esm.town/v/std/email?v=9";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3import { nominatimSearch } from "https://esm.town/v/stevekrouse/nominatimSearch";
4import { weatherGovGrid } from "https://esm.town/v/stevekrouse/weatherGovGrid";
14 lon,
15 });
16 let { properties: { periods } } = await fetchJSON(
17 grid.forecastHourly,
18 );
91app.get("/swagger", swaggerUI({ url: "/openapi.json" }));
92
93export default app.fetch;
4app.get("/", (c) => c.text("Hello world!"));
5app.get("/yeah", (c) => c.text("Routing!"));
6export default app.fetch;
432});
433
434export const oldfashioned = app.fetch;
2
3export async function emailRandomJoke2() {
4 async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
9 }
10
11 const randomJoke = await fetchRandomJoke();
12 const setup = randomJoke.setup;
13 const punchline = randomJoke.punchline;
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export const untitled_orangeImpala = fetchJSON(
4 "https://api.openai.com/v1/usage?date=2023-11-01",
5 {
1import { fetchJSON } from "https://val.town/v/stevekrouse/fetchJSON";
2
3await fetchJSON("/1");
4const a = (x) => x + 1;
5const b = (y) => a(y);