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/?q=database&page=297&format=json

For typeahead suggestions, use the /typeahead endpoint:

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

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

Found 10169 results for "database"(2200ms)

stevensDemo-remixedgetWeather.ts1 match

@katzenjโ€ขUpdated 3 months ago
130 }
131
132 console.log(`Weather forecast updated in the database.`);
133 return summary;
134}

stevensDemo-remixedgetCalendarEvents.ts1 match

@katzenjโ€ขUpdated 3 months ago
125 }
126
127 console.log(`Calendar events imported into the database.`);
128 return events;
129 } catch (error) {

stevensDemo-remixedgenerateFunFacts.ts2 matches

@katzenjโ€ขUpdated 3 months ago
8
9/**
10 * Retrieves previously generated fun facts from the memories database
11 * @returns Array of previous fun facts
12 */
47
48/**
49 * Inserts a fun fact into the memories database
50 * @param date Date for the fun fact in ISO format
51 * @param factText The fun fact text

stevensDemo-remixed.cursorrules2 matches

@katzenjโ€ขUpdated 3 months ago
208```
209โ”œโ”€โ”€ backend/
210โ”‚ โ”œโ”€โ”€ database/
211โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
212โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # DB query functions
270- Handle API calls properly with proper error catching
271
272### Database Patterns
273- Run migrations on startup or comment out for performance
274- Change table names when modifying schemas rather than altering

cerebras_codermain.tsx2 matches

@MATHEUSMARINHOโ€ขUpdated 3 months ago
1import { serveFile } from "https://esm.town/v/std/utils/index.ts";
2import { generateCode } from "./backend/generate-code.ts";
3import { createTables } from "./database/migrations.ts";
4import { createProject, getCode, getNextVersionNumber, insertVersion } from "./database/queries.ts";
5
6await createTables();

myNewWebsiteREADME.md1 match

@zcpbxโ€ขUpdated 3 months ago
21## Further resources
22
23- [React Hono Example](https://www.val.town/x/stevekrouse/reactHonoExample) is a bigger example project, with a SQLite database table, queries, client-side CSS, a favicon, and shared code that runs on both client and server.

MiniAppStarterREADME.md2 matches

@moeโ€ขUpdated 3 months ago
9- Hono + React + Tailwind
10- React Router + React Query
11- Built-in database (blob storage)
12- Farcaster mini app manifest + webhook + embed metadata
13- Farcaster notifications (storing tokens, sending recurring notifications, ...)
25- The **client-side entrypoint** is `/frontend/index.html`, which in turn imports `/frontend/index.tsx`, which in turn imports the React app from `/frontend/App.tsx`.
26
27[React Hono Example](https://www.val.town/x/stevekrouse/reactHonoExample) is a fuller featured example project, with a SQLite database table, queries, client-side CSS and a favicon, and some shared code that runs on both client and server.

sqliteExplorerAppREADME.md1 match

@benbarbersmithโ€ขUpdated 3 months ago
30- [ ] add triggers to sidebar
31- [ ] add upload from SQL, CSV and JSON
32- [ ] add ability to connect to a non-val town Turso database
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable

Contextualauth.ts1 match

@c15rโ€ขUpdated 3 months ago
1import type { Context } from "https://esm.sh/hono@3.11.7";
2import type { User } from "../../shared/types.ts";
3import { getUserByAccessToken } from "../database/user-queries.ts";
4
5export interface AuthContext {

Contextualindex.ts3 matches

@c15rโ€ขUpdated 3 months ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import type { MCPRequest } from "../shared/types.ts";
3import { runMigrations } from "./database/migrations.ts";
4import { getAuthContext, requireAuth, requireUserAuth, validateAuth } from "./mcp/auth.ts";
5import { MCPCognitiveServer } from "./mcp/server.ts";
24// });
25
26// Initialize database and MCP server
27let mcpServer: MCPCognitiveServer;
28
30 console.log("Initializing MCP Cognitive Tools Server...");
31
32 // Run database migrations
33 // await runMigrations();
34

customer-database-setup2 file matches

@stevenvapiโ€ขUpdated 2 months ago

prDatabase

@pdwโ€ขUpdated 2 months ago