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%20%22Image%20title%22?q=database&page=280&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"(762ms)

firstcron.ts4 matches

@gthmbriโ€ขUpdated 3 weeks ago
1import { TwitterClient } from "./services/twitter.ts";
2import { initDatabase } from "./database/migrations.ts";
3import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
4import { TWEETS_TABLE } from "./database/migrations.ts";
5
6/**
11
12 try {
13 // Initialize database if needed
14 await initDatabase();
15
16 const twitterClient = new TwitterClient();

firsttwitter.ts4 matches

@gthmbriโ€ขUpdated 3 weeks ago
1import { Tweet, TwitterUser, upsertTweet, upsertUser, recordMetrics } from "../database/queries.ts";
2
3// Twitter API v2 endpoints
69 };
70
71 // Save user to database
72 await upsertUser(user);
73
97 };
98
99 // Save tweet to database
100 await upsertTweet(tweet);
101
168 };
169
170 // Save tweet to database
171 await upsertTweet(tweet);
172

firstmigrations.ts3 matches

@gthmbriโ€ขUpdated 3 weeks ago
7
8/**
9 * Initialize database tables
10 */
11export async function initDatabase() {
12 // Create users table
13 await sqlite.execute(`
54 `);
55
56 console.log("Database initialized successfully");
57}

firstREADME.md3 matches

@gthmbriโ€ขUpdated 3 weeks ago
1# Tweet Metrics Tracker
2
3This application scrapes tweets and other metrics from Twitter/X API, stores them in a SQLite database, and displays them in a web interface.
4
5## Features
6
7- Fetches tweets and metrics from Twitter/X API
8- Stores data in SQLite database
9- Periodically updates data using a cron job
10- Displays tweets and metrics in a web interface
15```
16โ”œโ”€โ”€ backend/
17โ”‚ โ”œโ”€โ”€ database/
18โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
19โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # DB query functions

LaunchingofproductREADME.md2 matches

@Princessblessing93โ€ขUpdated 3 weeks ago
14```
15โ”œโ”€โ”€ backend/
16โ”‚ โ”œโ”€โ”€ database/
17โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
18โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # DB query functions
29- Frontend: HTML, JavaScript, Tailwind CSS
30- Backend: Hono (API framework)
31- Database: SQLite
32- Real-time updates: Polling
33

JobChatAppmigrations.ts2 matches

@cipherโ€ขUpdated 3 weeks ago
6
7export async function runMigrations() {
8 console.log("Starting database migrations...");
9
10 try {
37 console.log(`Table ${CHAT_MESSAGES_TABLE} created successfully`);
38
39 console.log("Database migrations completed successfully");
40 } catch (error) {
41 console.error("Error during migrations:", error);

JobChatAppREADME.md1 match

@cipherโ€ขUpdated 3 weeks ago
17```
18โ”œโ”€โ”€ backend/
19โ”‚ โ”œโ”€โ”€ database/
20โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
21โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # DB query functions
sqwnie

sqwniescratch.tsx1 match

@maxmโ€ขUpdated 3 weeks ago
25 })),
26 system: `You are a helpful sqlite assistant that will tell me information about my
27 sqlite database tables and help me get insights and visualizations from my data.`,
28 tools: {
29 think: thinkTool,

TownieTODOs.md1 match

@mackaberโ€ขUpdated 3 weeks ago
9- [ ] make it one click to branch off like old jp townie demos
10- [ ] opentownie as a pr bot
11- [ ] give it the ability to see its own client-side and server-side logs by building a middleware that shoves them into a SQL light database date and then give it a tool to access them
12- [ ] do a browser use or screenshot thing to give it access to its own visual output
13- [ ] Have it default to creating a new branch off main

Towniethink.ts1 match

@mackaberโ€ขUpdated 3 weeks ago
7export const thinkTool = tool({
8 description:
9 "Use the tool to think about something. It will not obtain new information or change the database, but just append the thought to the log. Use it when complex reasoning or some cache memory is needed.",
10 parameters: z.object({
11 thought: z.string().describe("A thought to think about."),

bookmarksDatabase

@s3thiโ€ขUpdated 3 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 6 months ago