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/$%7Bart_info.art.src%7D?q=database&page=320&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 3894 results for "database"(2964ms)

cerebras_coderindex2 matches

@shubhamvavdi•Updated 1 month ago
1import { generateCode } from "./backend/generate-code";
2import { createTables } from "./database/migrations";
3import { createProject, getCode, getNextVersionNumber, insertVersion } from "./database/queries";
4
5async function servePublicFile(path: string): Promise<Response> {

MiniAppStarterREADME.md1 match

@codyb•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/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.

SchoolListingWebsitemain.tsx1 match

@kamorudeenalo•Updated 1 month ago
531 const imageUrl = `/blob/${imageKey}`;
532
533 // Insert school into database
534 await sqlite.execute(`
535 INSERT INTO ${KEY}_schools

openTownieMadeThis1README.md1 match

@charmaine•Updated 1 month ago
60
61- Add proper authentication
62- Implement a real database for hotel and offer data
63- Use a more robust date picker library
64- Add form validation

sympatheticCoralCricketmain.tsx1 match

@Habibti•Updated 1 month ago
242 };
243
244 // In a real app, this would be a server-side database operation
245 setStories(prev => [storyToSubmit, ...prev]);
246

bedtimeStoriesChatRoommain.tsx1 match

@Precious37•Updated 1 month ago
128 `);
129 } catch (error) {
130 console.error("Database initialization error:", error);
131 }
132

EchoPromptermain.tsx8 matches

@data•Updated 1 month ago
942 const openai = new OpenAI();
943
944 // Use the val's URL as a unique key for database tables
945 const KEY = "EchoPrompter";
946
947 // Initialize database tables
948 await sqlite.execute(`
949 CREATE TABLE IF NOT EXISTS ${KEY}_agents (
978 });
979 } catch (error) {
980 console.error("Database error:", error);
981 return new Response(
982 JSON.stringify({ error: "Failed to fetch recent agents" }),
1175 }
1176
1177 // Insert into database with commands
1178 const result = await sqlite.execute(
1179 `INSERT INTO ${KEY}_agents (name, description, prompt, commands) VALUES (?, ?, ?, ?)`,
1215 const { agentId, message, history } = await request.json();
1216
1217 // Get agent from database
1218 const agentResult = await sqlite.execute(
1219 `SELECT * FROM ${KEY}_agents WHERE id = ?`,
1265 const response = completion.choices[0].message.content;
1266
1267 // Log conversation in database
1268 await sqlite.execute(
1269 `INSERT INTO ${KEY}_conversations (agent_id, user_message, assistant_response) VALUES (?, ?, ?)`,
1294 const { agentId, command, inputs, history } = await request.json();
1295
1296 // Get agent from database
1297 const agentResult = await sqlite.execute(
1298 `SELECT * FROM ${KEY}_agents WHERE id = ?`,
1478}
1479
1480async function initDatabase(db) {
1481 // Create agents table if not exists
1482 await db.execute(`

MiniAppStarterREADME.md1 match

@Metamorphosis0e•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/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.

openTownieMadeThis4README.md1 match

@charmaine•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.

MiniAppStarterREADME.md1 match

@andrewcarneal•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/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.

bookmarksDatabase

@s3thi•Updated 2 months ago

sqLiteDatabase1 file match

@ideofunk•Updated 5 months ago