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/image-url.jpg?q=database&page=203&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 7179 results for "database"(684ms)

iomigrations.ts3 matches

@jexโ€ขUpdated 1 week ago
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
2
3// Database schema for BubbleSpace
4// Note: Change table names when modifying schemas (e.g., add _v2, _v3)
5
15
16export async function runMigrations() {
17 console.log('Running database migrations...');
18
19 // Users table
122 await sqlite.execute(`CREATE INDEX IF NOT EXISTS idx_likes_post_id ON ${TABLES.LIKES}(post_id)`);
123
124 console.log('Database migrations completed successfully');
125}

ioREADME.md4 matches

@jexโ€ขUpdated 1 week ago
18```
19โ”œโ”€โ”€ backend/
20โ”‚ โ”œโ”€โ”€ database/
21โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Database schema
22โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # Database operations
23โ”‚ โ”œโ”€โ”€ routes/
24โ”‚ โ”‚ โ”œโ”€โ”€ auth.ts # Authentication routes
44## Tech Stack
45
46- **Backend**: Hono.js with SQLite database
47- **Frontend**: React 18.2.0 with TypeScript
48- **Styling**: TailwindCSS with custom animations

Chatbrainindex.ts7 matches

@Vennyโ€ขUpdated 1 week ago
25const twitterAPI = new TwitterAPI();
26
27// Database setup
28const TABLE_NAME = 'social_bot_posts_v1';
29
30// Initialize database
31async function initDatabase() {
32 await sqlite.execute(`CREATE TABLE IF NOT EXISTS ${TABLE_NAME} (
33 id TEXT PRIMARY KEY,
46
47// Initialize on startup
48await initDatabase();
49
50// Dashboard - serve the main interface
84 const generated = await contentGenerator.generateContent(request);
85
86 // Save to database
87 const postId = `post_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
88
133 );
134
135 // Save results to database
136 for (const result of results) {
137 const postId = `post_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
205 );
206
207 // Save to database
208 for (const result of results) {
209 const postId = `post_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;

Chatbrainauto-responder.ts2 matches

@Vennyโ€ขUpdated 1 week ago
28 this.openai = new OpenAI();
29 this.twitterAPI = new TwitterAPI();
30 this.initDatabase();
31 }
32
33 private async initDatabase() {
34 await sqlite.execute(`CREATE TABLE IF NOT EXISTS ${INTERACTIONS_TABLE} (
35 id TEXT PRIMARY KEY,

Chatbrainscheduler.ts2 matches

@Vennyโ€ขUpdated 1 week ago
7export class ContentScheduler {
8 constructor() {
9 this.initDatabase();
10 }
11
12 private async initDatabase() {
13 await sqlite.execute(`CREATE TABLE IF NOT EXISTS ${SCHEDULED_POSTS_TABLE} (
14 id TEXT PRIMARY KEY,

Chatbraincron-poster.ts1 match

@Vennyโ€ขUpdated 1 week ago
54 );
55
56 // Save results to database
57 for (const result of results) {
58 const postId = `auto_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;

reactHonoStarterREADME.md1 match

@ultragamer969โ€ขUpdated 1 week 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.
notion-2-bluesky

notion-2-blueskyscheduler.ts4 matches

@nuckyโ€ขUpdated 1 week ago
14 // Get environment variables
15 const notionToken = Deno.env.get('NOTION_TOKEN');
16 const notionDatabaseId = Deno.env.get('NOTION_DATABASE_ID');
17 const blueskyHandle = Deno.env.get('BLUESKY_HANDLE');
18 const blueskyAppPassword = Deno.env.get('BLUESKY_APP_PASSWORD');
19
20 if (!notionToken || !notionDatabaseId || !blueskyHandle || !blueskyAppPassword) {
21 throw new Error('Missing required environment variables. Please set: NOTION_TOKEN, NOTION_DATABASE_ID, BLUESKY_HANDLE, BLUESKY_APP_PASSWORD');
22 }
23
24 // Initialize clients
25 const notion = new NotionClient(notionToken, notionDatabaseId);
26 // Clean up handle - remove @ symbol, spaces, and invisible Unicode characters
27 const cleanHandle = blueskyHandle

cerebras_codermain.tsx2 matches

@MadLabโ€ขUpdated 2 weeks 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();
notion-2-bluesky

notion-2-blueskymanual-test.ts3 matches

@nuckyโ€ขUpdated 2 weeks ago
104 // Get environment variables
105 const notionToken = Deno.env.get('NOTION_TOKEN');
106 const notionDatabaseId = Deno.env.get('NOTION_DATABASE_ID');
107 const blueskyHandle = Deno.env.get('BLUESKY_HANDLE');
108 const blueskyAppPassword = Deno.env.get('BLUESKY_APP_PASSWORD');
109
110 if (!notionToken || !notionDatabaseId || !blueskyHandle || !blueskyAppPassword) {
111 throw new Error('Missing required environment variables');
112 }
113
114 // Initialize clients
115 const notion = new NotionClient(notionToken, notionDatabaseId);
116 const cleanHandle = blueskyHandle
117 .replace(/[^\w.-]/g, '')

bookmarksDatabase

@s3thiโ€ขUpdated 3 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 6 months ago