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=database&page=3&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 7464 results for "database"(3679ms)

Plantfo

PlantfoREADME.md4 matches

@Lladโ€ขUpdated 15 hours ago
8โ”œโ”€โ”€ index.ts # Main HTTP entry point (Hono app)
9โ”œโ”€โ”€ backend/
10โ”‚ โ””โ”€โ”€ database/
11โ”‚ โ””โ”€โ”€ cache.ts # Database cache functions
12โ”œโ”€โ”€ test.html # Plant API testing interface
13โ”œโ”€โ”€ admin.html # Cache admin interface
40
41### GET /admin
42Simple admin interface for viewing the cache database. Displays:
43- Total number of cached entries
44- List of all cached plants with their full JSON data
225- Built with Hono framework
226- Uses OpenAI GPT-4o-mini model
227- SQLite database for caching with automatic table creation
228- Includes input validation and error handling
229- Returns structured JSON responses
Plantfo

Plantfoadmin.html1 match

@Lladโ€ขUpdated 15 hours ago
9<body class="bg-gray-50 p-4">
10 <div class="max-w-4xl mx-auto">
11 <h1 class="text-2xl font-bold mb-4">Cache Database</h1>
12 <a href="/" class="text-blue-600 hover:underline mb-4 inline-block">โ† Back to Test Page</a>
13
Plantfo

Plantfoindex.ts8 matches

@Lladโ€ขUpdated 15 hours ago
11 clearCache,
12 type PlantInfo
13} from "./backend/database/cache.ts";
14
15const app = new Hono();
45 example: "/plant/rose",
46 testPage: "/ - Simple testing interface",
47 adminPage: "/admin - Cache database admin interface",
48 cache: {
49 totalCachedPlants: stats.totalEntries,
59});
60
61// Admin page to view cache database
62app.get("/admin", async (c) => {
63 const html = await readFile("/admin.html", import.meta.url);
178});
179
180// Test database endpoint
181app.get("/test-db", async (c) => {
182 try {
183 console.log("Testing database connection...");
184
185 // Test basic SQLite functionality
200
201 return c.json({
202 message: "Database test successful",
203 testResult,
204 selectResult
205 });
206 } catch (error) {
207 console.error("Database test failed:", error);
208 return c.json({
209 error: "Database test failed",
210 details: error instanceof Error ? error.message : "Unknown error"
211 }, 500);

val-town-http-mcp-serveropentownie.txt2 matches

@prashamtrivediโ€ขUpdated 18 hours ago
172```
173โ”œโ”€โ”€ backend/
174โ”‚ โ”œโ”€โ”€ database/
175โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
176โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # DB query functions
234- Handle API calls properly with proper error catching
235
236### Database Patterns
237- Run migrations on startup or comment out for performance
238- Change table names when modifying schemas rather than altering

val-town-http-mcp-servervalley.txt4 matches

@prashamtrivediโ€ขUpdated 18 hours ago
189```
190โ”œโ”€โ”€ backend/
191โ”‚ โ”œโ”€โ”€ database/
192โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
193โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # DB query functions
248 ```
249
250### Database Patterns
251- Run migrations on startup or comment out for performance
252- Change table names when modifying schemas rather than altering
315
316### SQL Operations
317- **execute-sql** / **sqlite-query**: Execute a SQL query against a SQLite database
318- **execute-sql-batch** / **sqlite-exec**: Execute multiple SQL statements against a SQLite database
319
320## Creating Val Town Projects

val-town-http-mcp-servervalley_local.txt3 matches

@prashamtrivediโ€ขUpdated 18 hours ago
97```
98โ”œโ”€โ”€ backend/
99โ”‚ โ”œโ”€โ”€ database/
100โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts
101โ”‚ โ”‚ โ””โ”€โ”€ queries.ts
229#### SQL Operations
23021. **execute-sql** / **sqlite-query**
231 - Description: Execute a SQL query against a SQLite database
232 - Arguments: `statement` (string)
233 - Returns: Query results
234
23522. **execute-sql-batch** / **sqlite-exec**
236 - Description: Execute multiple SQL statements against a SQLite database
237 - Arguments: `statements` (array of strings), Optional: `mode` (string: "read" or "write", default: "read")
238 - Returns: Results of the batch execution

val-town-http-mcp-serversqliteTools.ts4 matches

@prashamtrivediโ€ขUpdated 18 hours ago
9 server.tool(
10 "execute-sql",
11 "Execute a SQL query against a SQLite database",
12 {
13 statement: z.string().describe("SQL statement to execute"),
36 server.tool(
37 "execute-sql-batch",
38 "Execute multiple SQL statements against a SQLite database",
39 {
40 statements: z.array(z.string()).describe("Array of SQL statements to execute"),
67 server.tool(
68 "sqlite-query",
69 "Execute a SQL query against a SQLite database",
70 {
71 statement: z.string().describe("SQL statement to execute"),
94 server.tool(
95 "sqlite-exec",
96 "Execute multiple SQL statements against a SQLite database",
97 {
98 statements: z.array(z.string()).describe("Array of SQL statements to execute"),

Glancer_README.md1 match

@lightweightโ€ขUpdated 18 hours ago
15# healthCheck.ts
16
17This cron runs through all of the databases listed in the Glancer Val's environment variables, queries them, and stores the results in blob storage. The output is JSON rendered as HTML, in an HTTP Val.
18
19We embed that HTTP Val into the Glancer app in Notion. This way, we can see the health of the integration between Notion and val.town from Notion, and it loads instantly, without having to query Notion.

Glancerapi.routes.ts2 matches

@lightweightโ€ขUpdated 18 hours ago
3// Import route modules
4import cobrowse from "./cobrowse.api.routes.ts";
5import database from "./database.api.routes.ts";
6import demo from "./demo.api.routes.ts";
7import page from "./page.api.routes.ts";
12
13// mount routes
14app.route("/db", database);
15app.route("/page", page);
16app.route("/cobrowse", cobrowse);

Glancerdatabase.api.routes.ts2 matches

@lightweightโ€ขUpdated 18 hours ago
1import { Hono } from "npm:hono";
2import { getDatabase } from "../../controllers/database.controller.ts";
3
4const app = new Hono();
9 // hit the controller to return data
10 try {
11 const data = await getDatabase(id);
12 //
13 console.log(data);

bookmarksDatabase

@s3thiโ€ขUpdated 3 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 6 months ago