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=265&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"(326ms)

hello_worldfileDeleted.ts1 match

@shouser•Updated 1 month ago
21
22 // You could also do additional processing here based on the event
23 // For example, trigger other systems, update a database, etc.
24 return Response.json({
25 ok: true,

hello_worldfileCreated.ts1 match

@shouser•Updated 1 month ago
23
24 // You could also do additional processing here based on the event
25 // For example, trigger other systems, update a database, etc.
26 return Response.json({
27 ok: true,

project_updates_webhookqueries.ts2 matches

@shouser•Updated 1 month ago
3import { createTables, projectStatesTableName, subscriptionsTableName } from "./migrations.ts";
4
5// This will create the database table if it doesn't exist.
6// This will run every time the app starts up. You can
7// comment out this line for a modest (30ms) perforamnce improvement
8// on cold starts. It's left in to ensure the database tables are
9// automatically set up correctly for users who fork this app.
10await createTables();

project_updates_webhookindex.ts1 match

@shouser•Updated 1 month ago
2import { readFile, servePublicFile } from "https://esm.town/v/stevekrouse/utils@187-main/serve-public/index.ts";
3import { Hono } from "npm:hono";
4import { insertWebhook } from "./database/queries.ts";
5
6const app = new Hono();

cerebras_coderindex2 matches

@sukanya20•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

@kizzlah•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> {

forky-1741889903243README.md1 match

@shouser•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.

reactHonoStarterREADME.md1 match

@std•Updated 1 month 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.

HONCmigrate.ts1 match

@charmaine•Updated 1 month ago
5 * For this reason, we need to manually create the users table.
6 */
7export const migrateDatabase = async () => {
8 await sqlite.execute(`
9CREATE TABLE IF NOT EXISTS \`users\` (

HONCtypes.ts2 matches

@charmaine•Updated 1 month ago
1import type { LibSQLDatabase } from "../deps/drizzle.ts";
2import type * as schema from "./schema";
3
4export type DBType = LibSQLDatabase<typeof schema>;