Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/$2?q=fetch&page=33&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=fetch

Returns an array of strings in format "username" or "username/projectName"

Found 13469 results for "fetch"(798ms)

static-html-startermain.tsx1 match

@matt_hallway•Updated 2 days ago
5app.get("/", () => serveFile("/index.html", import.meta.url));
6app.get("/**/*", c => serveFile(c.req.path, import.meta.url));
7export default app.fetch;

Glancerdemo.ts1 match

@lightweight•Updated 2 days ago
30 // const apiUrl = new URL(c.req.url);
31 // apiUrl.pathname = `/api/demo/${id}`;
32 // const response = await fetch(apiUrl.toString());
33 const page = await getPage(id);
34

fotmobindex.html6 matches

@cemugur70•Updated 2 days ago
469
470 // Send to backend for analysis
471 const response = await fetch('/api/analyze', {
472 method: 'POST',
473 headers: {
563
564 try {
565 const response = await fetch('/api/analyze', {
566 method: 'POST',
567 headers: {
674
675 try {
676 const response = await fetch('/api/export/full', {
677 method: 'POST',
678 headers: { 'Content-Type': 'application/json' },
701
702 try {
703 const response = await fetch('/api/export/iddaa', {
704 method: 'POST',
705 headers: { 'Content-Type': 'application/json' },
728
729 try {
730 const response = await fetch('/api/export/poisson', {
731 method: 'POST',
732 headers: { 'Content-Type': 'application/json' },
755
756 try {
757 const response = await fetch('/api/export/accuracy', {
758 method: 'POST',
759 headers: { 'Content-Type': 'application/json' },

fotmobindex.ts1 match

@cemugur70•Updated 2 days ago
532}
533
534export default app.fetch;

LiveStormMCPindex.ts8 matches

@supagroova•Updated 2 days ago
5import { StreamableHTTPServerTransport } from "npm:@modelcontextprotocol/sdk/server/streamableHttp.js";
6import { isInitializeRequest } from "npm:@modelcontextprotocol/sdk/types.js";
7import { toFetchResponse, toReqRes } from "npm:fetch-to-node";
8import { setupMcpServer } from './src/mcp.ts';
9import { randomUUID } from 'node:crypto';
53 }
54 }
55 return toFetchResponse(res);
56
57});
110 }
111
112 return toFetchResponse(res);
113});
114
162 await transport.handleRequest(req, res, body);
163
164 return toFetchResponse(res);
165});
166
190 await transport.handleRequest(req, res);
191
192 return toFetchResponse(res);
193});
194
212 const transport = transports[sessionId];
213 await transport.handleRequest(req, res);
214 return toFetchResponse(res);
215 } catch (error) {
216 console.error('Error handling session termination:', error);
232 * This will be exposed as a Val.town HTTP endpoint
233 */
234export default app.fetch;
235
236// If running locally, start the Hono server
240 const { serve } = await import('npm:@hono/node-server');
241 const port = Deno.env.get("PORT") ? Number(Deno.env.get("PORT")) : 8787;
242 serve({ fetch: app.fetch, port });
243 console.log(`🚀 MCP Hono server running locally on http://localhost:${port}`);
244 })();

LiveStormMCPREADME.md3 matches

@supagroova•Updated 2 days ago
9## How it works
10
111. The server fetches and parses the Livestorm API's OpenAPI definition
122. It dynamically creates MCP Resources and Tools based on the API endpoints
133. When a client requests a Resource or Tool, the server proxies the request to
49
50- `index.ts`: Main entry point with HTTP trigger
51- `livestorm.ts`: Functions to fetch and parse the OpenAPI definition
52- `mcp.ts`: MCP server setup and configuration
53
97```
98
99Deno will automatically fetch and cache all dependencies.
100

LiveStormMCPmcp.ts4 matches

@supagroova•Updated 2 days ago
6 extractGetEndpoints,
7 extractMutationEndpoints,
8 fetchOpenApiSpec,
9 proxyRequest,
10} from "../src/livestorm.ts";
45
46 try {
47 console.log("Fetching Livestorm API OpenAPI spec...");
48 // Fetch the OpenAPI spec
49 const openApiSpec = await fetchOpenApiSpec();
50
51 // Extract GET endpoints (Resources)

LiveStormMCPlivestorm.ts8 matches

@supagroova•Updated 2 days ago
15
16/**
17 * Fetches the Livestorm API OpenAPI definition
18 */
19export async function fetchOpenApiSpec(): Promise<OpenApiSchema> {
20 try {
21 // Check if the OpenAPI spec is cached in Blob storage
28 e instanceof ValTownBlobNotFoundError || e instanceof ValTownBlobError
29 ) {
30 console.log(`Fetching OpenAPI spec from ${LIVESTORM_API_SPEC_URL}...`);
31 response = await fetch(LIVESTORM_API_SPEC_URL);
32 if (!response.ok) {
33 const errorText = await response.text();
34 console.error(
35 `Failed to fetch OpenAPI spec: ${response.status} ${response.statusText}`,
36 );
37 console.error(`Response body: ${errorText}`);
38 throw new Error(
39 `Failed to fetch OpenAPI spec: ${response.status} ${response.statusText}`,
40 );
41 }
71 return parsedSpec;
72 } catch (error) {
73 console.error("Error fetching OpenAPI spec:", error);
74 throw error;
75 }
223 try {
224 // Make the request to Livestorm API
225 const response = await fetch(url, requestOptions);
226
227 // Return the response

val-town-pagesmain.tsx1 match

@nbbaier•Updated 2 days ago
18});
19
20export default app.fetch;

Cinetwaindex.ts1 match

@eddie_walk•Updated 2 days ago
84
85// This is the entry point for HTTP vals
86export default app.fetch;

GithubPRFetcher

@andybak•Updated 2 days ago

proxiedfetch1 file match

@jayden•Updated 3 days ago