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/?q=database&page=267&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 2780 results for "database"(272ms)

HONCdrizzle.ts2 matches

@fiberplane•Updated 1 month ago
1// Import drizzle deps with npm: specifier because exports don't get picked up properly by typescript when using esm.sh
2import { drizzle, type LibSQLDatabase } from "npm:drizzle-orm@0.39.3/libsql";
3import { and, eq, desc, relations, sql } from "npm:drizzle-orm@0.39.3";
4import { integer, sqliteTable, text } from "npm:drizzle-orm@0.39.3/sqlite-core";
5
6export { drizzle };
7export type { LibSQLDatabase };
8export { and, eq, desc, relations, sql };
9export { integer, sqliteTable, text };

cerebras_coderindex2 matches

@afotoss•Updated 1 month ago
1import { generateCode } from "./backend/generate-code";
2import { createTables } from "./database/migrations";
3import { createProject, getCode, getNextVersionNumber, insertVersion } from "./database/queries";
4
5async function servePublicFile(path: string): Promise<Response> {

cerebras_coderindex2 matches

@Hits005•Updated 1 month ago
1import { generateCode } from "./backend/generate-code";
2import { createTables } from "./database/migrations";
3import { createProject, getCode, getNextVersionNumber, insertVersion } from "./database/queries";
4
5async function servePublicFile(path: string): Promise<Response> {

reactHonoStarterREADME.md1 match

@agree•Updated 1 month ago
7The **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`.
8
9[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.

aBeautifulMindREADME.md1 match

@charmaine•Updated 1 month ago
7The **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`.
8
9[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.

cerebras_coderindex2 matches

@Armanitown•Updated 1 month ago
1import { generateCode } from "./backend/generate-code";
2import { createTables } from "./database/migrations";
3import { createProject, getCode, getNextVersionNumber, insertVersion } from "./database/queries";
4
5async function servePublicFile(path: string): Promise<Response> {

stevekrouse_dot_comhomepage.tsx1 match

@aginfer08•Updated 1 month ago
13 todayHits = hits.todayHits;
14 } catch (e) {
15 console.log("Caught database error: ", e);
16 }
17 return new Response(

social_dataindex.ts2 matches

@stevekrouse•Updated 1 month ago
5import ValTown from "npm:@valtown/sdk";
6import SocialData from "../sdk/index.ts";
7import { setupDatabase, USAGE_TABLE } from "./database.ts";
8import { searchTwitterRoute } from "./routes/search.ts";
9
14
15// Uncomment this if you're forking this project:
16// await setupDatabase()
17
18// https://socialdata.gitbook.io/docs/pricing

social_dataindex.ts2 matches

@fiberplane•Updated 1 month ago
5import ValTown from "npm:@valtown/sdk";
6import SocialData from "../sdk/index.ts";
7import { setupDatabase, USAGE_TABLE } from "./database.ts";
8import { searchTwitterRoute } from "./routes/search.ts";
9
14
15// Uncomment this if you're forking this project:
16// await setupDatabase()
17
18// https://socialdata.gitbook.io/docs/pricing

social_datadatabase.ts1 match

@fiberplane•Updated 1 month ago
3export const USAGE_TABLE = "socialDataProxy_usage_2";
4
5export async function setupDatabase() {
6 await sqlite.execute(`
7 CREATE TABLE IF NOT EXISTS ${USAGE_TABLE} (