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/$%7BsvgDataUrl%7D?q=fetch&page=18&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 14084 results for "fetch"(2742ms)

fetchJSON1 file match

@dvergin•Updated 1 year ago

fetchBcycleCounts1 file match

@jonbo•Updated 1 year ago

anchorPDSCLAUDE.md3 matches

@tijs•Updated 1 hour ago
27- Use Hono for API endpoints: `import { Hono } from "https://esm.sh/hono@3.11.7"`
28- **Never** use `serveStatic` middleware - use Val Town utilities instead
29- Entry point: `export default app.fetch`
30- Always include error unwrapping: `app.onError((err, c) => { throw err; })`
31
138- **Federation**: AT Protocol compliant
139- **API Framework**: Hono with proper error unwrapping
140- **Entry Point**: `backend/index.ts` exports `app.fetch`
141- **Production URL**: https://anchorpds.val.run/
142
171### Val Town Specifics
172
173- Entry point: `backend/index.ts` exports `app.fetch`
174- No local development server - deploy to Val Town to test HTTP endpoints
175- Use Val Town dashboard for environment variables and secrets

anchorPDSauth.ts1 match

@tijs•Updated 1 hour ago
26 for (const pdsHost of commonPDSHosts) {
27 try {
28 const sessionResponse = await fetch(`${pdsHost}/xrpc/com.atproto.server.getSession`, {
29 headers: {
30 "Authorization": `Bearer ${token}`,