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/$%7Burl%7D?q=database&page=338&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 8428 results for "database"(8911ms)

book-lookup-notionindex.ts16 matches

@nuckyโ€ขUpdated 1 month ago
1/**
2 * Notion Book Database Auto-Populator
3 * Main HTTP handler and API endpoints
4 */
44app.get('/status', async (c) => {
45 const hasNotionToken = !!Deno.env.get('NOTION_API_TOKEN');
46 const hasNotionDatabase = !!Deno.env.get('NOTION_DATABASE_ID');
47
48 const status = {
49 configured: hasNotionToken && hasNotionDatabase,
50 notion_token: hasNotionToken ? 'Set' : 'Missing',
51 notion_database: hasNotionDatabase ? 'Set' : 'Missing',
52 timestamp: new Date().toISOString()
53 };
60 setup_instructions: {
61 notion_token: 'Set NOTION_API_TOKEN environment variable with your Notion integration token',
62 notion_database: 'Set NOTION_DATABASE_ID environment variable with your book database ID'
63 }
64 }, 400);
110app.get('/debug', (c) => {
111 const token = Deno.env.get('NOTION_API_TOKEN');
112 const databaseId = Deno.env.get('NOTION_DATABASE_ID');
113
114 return c.json({
118 prefix: token?.substring(0, 10) + '...' || 'N/A'
119 },
120 database_info: {
121 exists: !!databaseId,
122 length: databaseId?.length || 0,
123 prefix: databaseId?.substring(0, 8) + '...' || 'N/A'
124 }
125 });
171app.get('/help', (c) => {
172 return c.json({
173 title: 'Notion Book Database Auto-Populator',
174 description: 'Automatically enriches your Notion book database with metadata from Google Books API',
175 endpoints: {
176 'GET /': 'Process all incomplete records',
183 step1: 'Create a Notion integration at https://www.notion.so/my-integrations',
184 step2: 'Copy the integration token and set it as NOTION_API_TOKEN environment variable',
185 step3: 'Share your book database with the integration',
186 step4: 'Copy the database ID from the URL and set it as NOTION_DATABASE_ID environment variable',
187 step5: 'Ensure your database has these properties: Title (title), Author (rich text), ISBN (rich text), Year Published (number), Page Count (number), Publisher (rich text)'
188 },
189 database_properties: {
190 required: ['Title (title)', 'Author (rich text)'],
191 populated: ['ISBN (rich text)', 'Year Published (number)', 'Page Count (number)', 'Publisher (rich text)'],

book-lookup-notioncron-processor.ts4 matches

@nuckyโ€ขUpdated 1 month ago
15 if (result.totalProcessed > 0) {
16 const summary = `
17๐Ÿ“š Book Database Update Complete
18
19๐Ÿ“Š Summary:
39
40 await email({
41 subject: `๐Ÿ“š Book Database Updated - ${result.successful} books enriched`,
42 text: summary
43 });
52 // Send error notification
53 await email({
54 subject: 'โŒ Book Database Update Failed',
55 text: `
56The scheduled book database update failed with the following error:
57
58${error instanceof Error ? error.message : 'Unknown error'}

mfe-demoREADME.md1 match

@hacksoreโ€ขUpdated 1 month ago
9- The **client-side entrypoint** is `/frontend/index.html`, which in turn imports `/frontend/index.tsx`, which in turn imports the React app from `/frontend/components/App.tsx`.
10
11[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

@argmnโ€ขUpdated 1 month 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

testPondiverseaddCreation2 matches

@argmnโ€ขUpdated 1 month ago
45 }
46
47 // Now it's time to upload things to database and blob storage
48 // First, add to database, and get the ID
49 const id = await sqlite.execute(
50 `INSERT INTO ${TABLE_NAME} (title, type, time) VALUES ($title, $type, $time)`,

To-owired-nieTODOs.md1 match

@toowiredโ€ขUpdated 1 month ago
9- [ ] make it one click to branch off like old jp townie demos
10- [ ] opentownie as a pr bot
11- [ ] give it the ability to see its own client-side and server-side logs by building a middleware that shoves them into a SQL light database date and then give it a tool to access them
12- [ ] do a browser use or screenshot thing to give it access to its own visual output
13- [ ] Have it default to creating a new branch off main

To-owired-niethink.ts1 match

@toowiredโ€ขUpdated 1 month ago
7export const thinkTool = tool({
8 description:
9 "Use the tool to think about something. It will not obtain new information or change the database, but just append the thought to the log. Use it when complex reasoning or some cache memory is needed.",
10 parameters: z.object({
11 thought: z.string().describe("A thought to think about."),

To-owired-niesystem_prompt.txt2 matches

@toowiredโ€ขUpdated 1 month ago
174```
175โ”œโ”€โ”€ backend/
176โ”‚ โ”œโ”€โ”€ database/
177โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
178โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # DB query functions
234 ```
235
236### Database Patterns
237- Run migrations on startup or comment out for performance
238- Change table names when modifying schemas rather than altering

To-owired-niesend-message.ts1 match

@toowiredโ€ขUpdated 1 month ago
10 overLimit,
11 startTrackingUsage,
12} from "../database/queries.tsx";
13import { makeChangeValTypeTool, makeFetchTool, makeTextEditorTool } from "../tools/index.ts";
14import fileWithLinesNumbers from "../utils/fileWithLinesNumbers.ts";

To-owired-niequeries.tsx1 match

@toowiredโ€ขUpdated 1 month ago
4import { INFERENCE_CALLS_TABLE, USAGE_TABLE } from "./schema.tsx";
5
6// Eventually we'll have a user database,
7// but in the meantime, we can cache user info in memory
8const userIdCache: { [key: string]: any } = {};

customer-database-setup2 file matches

@stevenvapiโ€ขUpdated 1 week ago

prDatabase

@pdwโ€ขUpdated 2 weeks ago