14);
15
16export default app.fetch;
14}))
15
16export default app.fetch
17```
9 const getContent = async (url: string) => {
10 try {
11 const resp = await fetch(url)
12 if (!resp.ok) {
13 return null
353});
354
355export default app.fetch;
20 paperangProtocol.log(`Saving MAC address: ${macAddress}`, 'info');
21
22 const response = await fetch('/api/save-mac', {
23 method: 'POST',
24 headers: { 'Content-Type': 'application/json' },
45 paperangProtocol.log('Loading saved MAC address...', 'debug');
46
47 const response = await fetch('/api/get-mac');
48 const result = await response.json();
49
7 }
8
9 const result = await fetch(`https://mirrors.ctan.org/${path}`);
10 if (!result.ok) {
11 return new Response(result.statusText, { status: result.status });
20});
21
22export default app.fetch;
4app.get("/", (c) => c.text("Hello from Hono!"));
5app.get("/yeah", (c) => c.text("Routing!"));
6export default app.fetch;
21});
22
23export default router.fetch;
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export async function socialDataSearch(query: string): Promise<SocialDataResponse> {
4 const url = new URL("https://stevekrouse-socialdataproxy.web.val.run/twitter/search");
5 url.searchParams.set("query", query);
6 return await fetchJSON(url.toString(), {
7 bearer: Deno.env.get("valtown"),
8 });