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=431&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 7587 results for "database"(658ms)

weddingRSVPTOForevermain.tsx2 matches

@MrigbalodeUpdated 1 month ago
202 `);
203 } catch (error) {
204 console.error("Database initialization error:", error);
205 return new Response(`Database error: ${error.message}`, { status: 500 });
206 }
207

AI_generated_Picturesmain.tsx1 match

@ShegaUpdated 1 month ago
64 const { blob } = await import("https://esm.town/v/std/blob");
65
66 // Unique key for this val's database tables
67 const KEY = "AI_generated_Pictures";
68 const SCHEMA_VERSION = 1;

cerebras_codermain.tsx2 matches

@pedro169Updated 1 month 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();

MyStevenspopulateDemo.ts4 matches

@billogiovanniUpdated 1 month ago
379];
380
381// Insert memories into the database
382async function insertDemoMemories() {
383 try {
420 await insertDemoMemories();
421
422 console.log("Demo database successfully populated!");
423 return "Demo database successfully populated!";
424 } catch (error) {
425 console.error("Error populating demo database:", error);
426 throw error;
427 }

reactHonoStarterREADME.md1 match

@stfnsrUpdated 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.

MyStevensREADME.md3 matches

@billogiovanniUpdated 1 month ago
13## Technical Architecture
14
15**⚠️ important caveat: the admin dashboard doesn't have auth! currently it just relies on security by obscurity of people not knowing the url to a private val. this is not very secure. if you fork this project and put sensitive data in a database you should think carefully about how to secure it.**
16
17Stevens has been designed with the utmost simplicity and extensibility, much like a well-organized household. At the heart of his operation lies a single "memories" table - a digital equivalent of a butler's meticulous records. This table serves as the foundation for all of Stevens' operations.
45- `dashboard`: the admin view for showing the memories notebook + visualizing imports
46- `dailyBriefing`: stuff related to sending a daily update via telegram
47- `dbUtils`: little one-off scripts for database stuff
48
49## Hiring your own Stevens
57- For the Google Calendar integration you'll need `GOOGLE_CALENDAR_ACCOUNT_ID` and `GOOGLE_CALENDAR_CALENDAR_ID`. See [these instuctions](https://www.val.town/v/stevekrouse/pipedream) for details.
58
59**important caveat: the admin dashboard doesn't have auth! currently it just relies on security by obscurity of people not knowing the url to a private val. this is not very secure, if you put sensitive data in a database you should think carefully about how to secure it.**
60
61Overall it's a simple enough project that I encourage you to just copy the ideas and run in your own direction rather than try to use it as-is.

myNewWebsiteREADME.md1 match

@billogiovanniUpdated 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.
12 I just made a change to it
13

pondiverseaddCreation2 matches

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

JimeluStevensgetCalendarEvents.ts1 match

@luke_fUpdated 1 month ago
120 }
121
122 console.log(`Calendar events imported into the database.`);
123 return events;
124 } catch (error) {

JimeluStevensgenerateFunFacts.ts2 matches

@luke_fUpdated 1 month 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

bookmarksDatabase

@s3thiUpdated 4 months ago

sqLiteDatabase1 file match

@ideofunkUpdated 6 months ago