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/%7Bresult.originalUrl%7D?q=database&page=8&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 10141 results for "database"(1809ms)

Towniequeries.tsx1 match

@pcstyleโ€ขUpdated 5 days ago
10const PRICE_MULTIPLIER = 1.5;
11
12// Eventually we'll have a user database,
13// but in the meantime, we can cache user info in memory
14const userIdCache: { [key: string]: any } = {};

Towniepurchase-credits.ts1 match

@pcstyleโ€ขUpdated 5 days ago
1import { Hono } from "npm:hono";
2import Stripe from "npm:stripe";
3import { getUser } from "../database/queries.tsx";
4import { getEnvVarName } from "../../shared/is-prod-branch.ts";
5

Townieindex.ts1 match

@pcstyleโ€ขUpdated 5 days ago
9import favicon from "./frontend/favicon.http.tsx";
10import loginRoute from "./frontend/routes/login.tsx";
11import adminDashboard from "./backend/database/usage-dashboard/index.ts";
12
13const SCOPE =

Townie.cursorrules2 matches

@pcstyleโ€ขUpdated 5 days ago
198```
199โ”œโ”€โ”€ backend/
200โ”‚ โ”œโ”€โ”€ database/
201โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
202โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # DB query functions
257 ```
258
259### Database Patterns
260- Run migrations on startup or comment out for performance
261- Change table names when modifying schemas rather than altering

Towniecredit-balance.ts1 match

@pcstyleโ€ขUpdated 5 days ago
1import { Hono } from "npm:hono";
2import { getCreditBalance, getUser } from "../database/queries.tsx";
3
4const app = new Hono();

untitled-3546README.md1 match

@pcstyleโ€ขUpdated 5 days ago
29
30- [React Hono Example](https://www.val.town/x/stevekrouse/reactHonoExample) is a
31 bigger example project, with a SQLite database table, queries, client-side
32 CSS, a favicon, and shared code that runs on both client and server.

untitled-4123README.md1 match

@rafaelssโ€ขUpdated 5 days ago
29
30- [React Hono Example](https://www.val.town/x/stevekrouse/reactHonoExample) is a
31 bigger example project, with a SQLite database table, queries, client-side
32 CSS, a favicon, and shared code that runs on both client and server.

croneAGENTS.md2 matches

@jrmann100โ€ขUpdated 5 days ago
198```
199โ”œโ”€โ”€ backend/
200โ”‚ โ”œโ”€โ”€ database/
201โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
202โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # DB query functions
257 ```
258
259### Database Patterns
260- Run migrations on startup or comment out for performance
261- Change table names when modifying schemas rather than altering

reactHonoExampleREADME.md3 matches

@McGernโ€ขUpdated 5 days ago
6 project, which is why it's in the folder above this one, even though it's
7 technically part of the backend
8- `database/` - this contains the code for interfacing with the app's SQLite
9 database table
10
11## Hono
41This app has two CRUD API routes: for reading and inserting into the messages
42table. They both speak JSON, which is standard. They import their functions from
43`/backend/database/queries.ts`. These routes are called from the React app to
44refresh and update data.
45

reactHonoExampleindex.ts1 match

@McGernโ€ขUpdated 5 days ago
5} from "https://esm.town/v/std/utils/index.ts";
6import { Hono } from "npm:hono";
7import { getMessages, insertMessage } from "./backend/database/queries.ts";
8
9const app = new Hono();

customer-database-setup2 file matches

@stevenvapiโ€ขUpdated 2 months ago

prDatabase

@pdwโ€ขUpdated 2 months ago