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/$2?q=database&page=47&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 7183 results for "database"(2713ms)

Bloggedqueries.ts1 match

@David_Naviโ€ขUpdated 6 days ago
231}
232
233// Helper functions to map database rows to TypeScript types
234function mapDbUserToUser(row: any): User {
235 return {

Towniequeries.tsx1 match

@valdottownโ€ขUpdated 6 days 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 } = {};

CreateREADME.md4 matches

@Omosola_1โ€ขUpdated 6 days ago
23```
24โ”œโ”€โ”€ backend/
25โ”‚ โ”œโ”€โ”€ database/
26โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Database schema
27โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # Database operations
28โ”‚ โ”œโ”€โ”€ routes/
29โ”‚ โ”‚ โ”œโ”€โ”€ products.ts # Product management endpoints
62
63- **Backend**: Hono.js API framework
64- **Database**: SQLite for data storage
65- **Frontend**: React with TypeScript
66- **Styling**: TailwindCSS

HAPIchat.ts1 match

@dIgitalfulusโ€ขUpdated 6 days ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import type { ChatMessage, ApiResponse } from "../../shared/types.ts";
3import { createChatMessage, getChatMessages } from "../database/queries.ts";
4
5const app = new Hono();

Bloggedmigrations.ts3 matches

@David_Naviโ€ขUpdated 6 days ago
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
2
3// Database schema setup for Daily Blog platform
4export async function runMigrations() {
5 console.log("Running database migrations...");
6
7 // Users table
77 await sqlite.execute(`CREATE INDEX IF NOT EXISTS idx_likes_user_post ON likes(user_id, post_id)`);
78
79 console.log("Database migrations completed successfully");
80}
81

HAPIproperties.ts1 match

@dIgitalfulusโ€ขUpdated 6 days ago
7 updateProperty,
8 deleteProperty
9} from "../database/queries.ts";
10
11const app = new Hono();

osakwe1index.ts2 matches

@osakweโ€ขUpdated 6 days ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { readFile, serveFile } from "https://esm.town/v/std/utils@85-main/index.ts";
3import { runMigrations } from "./database/migrations.ts";
4import properties from "./routes/properties.ts";
5import chat from "./routes/chat.ts";
12});
13
14// Initialize database
15await runMigrations();
16

HAPImigrations.ts1 match

@dIgitalfulusโ€ขUpdated 6 days ago
35 `);
36
37 console.log('Database migrations completed');
38}
39

BloggedREADME.md5 matches

@David_Naviโ€ขUpdated 6 days ago
16```
17โ”œโ”€โ”€ backend/
18โ”‚ โ”œโ”€โ”€ database/
19โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Database schema setup
20โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # Database query functions
21โ”‚ โ”œโ”€โ”€ routes/
22โ”‚ โ”‚ โ”œโ”€โ”€ auth.ts # Authentication routes
44- **Backend**: Hono (TypeScript API framework)
45- **Frontend**: React 18.2.0 with TypeScript
46- **Database**: SQLite
47- **Styling**: TailwindCSS
48- **Storage**: Val Town Blob for user avatars
50## Getting Started
51
521. The backend automatically sets up the database on first run
532. Visit the main page to start browsing posts
543. Create an account to start posting and interacting

HAPIREADME.md4 matches

@dIgitalfulusโ€ขUpdated 6 days ago
11```
12โ”œโ”€โ”€ backend/
13โ”‚ โ”œโ”€โ”€ database/
14โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Database schema setup
15โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # Database query functions
16โ”‚ โ”œโ”€โ”€ routes/
17โ”‚ โ”‚ โ”œโ”€โ”€ properties.ts # Property CRUD operations
41## Tech Stack
42
43- **Backend**: Hono.js with SQLite database
44- **Frontend**: React with TypeScript
45- **Styling**: TailwindCSS

bookmarksDatabase

@s3thiโ€ขUpdated 3 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 6 months ago