8export default async function(interval: Interval) {
9 try {
10 const response = await fetch(AtomURL);
11 const feedText = await response.text();
12
7app.get("/**/*", c => serveFile("/rp" + c.req.path, import.meta.url));
8
9export default app.fetch;
8export default async function(interval: Interval) {
9 try {
10 const response = await fetch(AtomURL);
11 const feedText = await response.text();
12
8export default async function(interval: Interval) {
9 try {
10 const response = await fetch(AtomURL);
11 const feedText = await response.text();
12
66ActivityPub servers can verify signatures by:
671. Extracting `keyId` from signature header
682. Fetching your actor document at `/actor`
693. Using the `publicKey.publicKeyPem` field to verify the signature
70
18
19 // Send timestamp back to server
20 fetch('/timestamp', {
21 method: 'POST',
22 headers: { 'Content-Type': 'text/plain' },
1import { blob } from "https://esm.town/v/std/blob";
2import { email } from "https://esm.town/v/std/email";
3import { fetch } from "https://esm.town/v/std/fetch";
4import { parseXML } from "https://esm.town/v/stevekrouse/parseXML";
5
8
9export async function gitHubReleaseTracker() {
10 const response = await fetch(AtomURL);
11 const newestEntry = (await parseXML(await response.text())).feed
12 .entry[0];
187
188 try {
189 // Fetch both paths in parallel for efficiency
190 // We now include the fontStyle hint for the AI
191 const [startResponse, endResponse] = await Promise.all([
192 fetch(\`\${JIT_URL}?text=\${textStart}&fontStyle=serif\`),
193 fetch(\`\${JIT_URL}?text=\${textEnd}&fontStyle=modern\`)
194 ]);
195
278});
279
280// Export the Hono app's fetch handler
281export default app.fetch;
4 const url = new URL(req.url);
5 const camera = (url.pathname == "/") ? "camera1" : url.pathname.slice(1);
6 const response = await fetch("https://gliderport.thilenius.com/gpapi/getLastFiveSmallImages");
7 const json = await response.json();
8
221
222 // Inject data to avoid extra round-trips
223 const initialData = await fetchInitialData();
224 const dataScript = `<script>
225 window.__INITIAL_DATA__ = ${JSON.stringify(initialData)};
268
2695. **API Design:**
270 - `fetch` handler is the entry point for HTTP vals
271 - Run the Hono app with `export default app.fetch // This is the entry point for HTTP vals`
272
2736. **Hono Peculiarities:**