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/$%7Bsuccess?q=database&page=30&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 5148 results for "database"(1752ms)

TyappValjobs.ts1 match

@oluwa_tyโ€ขUpdated 4 days ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { cors } from "https://esm.sh/@hono/cors@0.0.6";
3import { getAllJobPostings, getJobPostingById, createJobPosting } from "../database/queries.ts";
4import type { JobPostingFormData } from "../../shared/types.ts";
5

TyappValindex.ts2 matches

@oluwa_tyโ€ขUpdated 4 days ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { cors } from "https://esm.sh/@hono/cors@0.0.6";
3import { runMigrations } from "./database/migrations.ts";
4import jobRoutes from "./routes/jobs.ts";
5import chatRoutes from "./routes/chat.ts";
18});
19
20// Run database migrations on startup
21app.use("*", async (c, next) => {
22 try {

TyappValREADME.md2 matches

@oluwa_tyโ€ขUpdated 4 days ago
15
16- Backend: Hono (TypeScript)
17- Database: SQLite
18- Frontend: React with Tailwind CSS
19- Real-time: Server-sent events for chat updates
21## Project Structure
22
23- `/backend`: API routes and database logic
24- `/frontend`: React components and UI
25- `/shared`: Shared types and utilities

TastkItindex.ts1 match

@diegoivoโ€ขUpdated 4 days ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { runMigrations } from "./database/migrations.ts";
3import authRoutes from "./routes/auth.ts";
4import projectRoutes from "./routes/projects.ts";

a_new_websiteREADME.md1 match

@wolfโ€ขUpdated 4 days 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.

weddingintrosindex.ts4 matches

@FusionIโ€ขUpdated 4 days ago
21// API endpoint to get all themes
22app.get('/api/themes', async c => {
23 // In a real app, this would come from a database
24 const themes = [
25 {
128 const id = c.req.param('id');
129
130 // In a real app, this would come from a database
131 const themes = await app.fetch('/api/themes').then(res => res.json());
132 const theme = themes.find((t: any) => t.id === id);
139});
140
141// API endpoint to submit an order (this would typically store the order in a database)
142app.post('/api/orders', async c => {
143 try {
149 }
150
151 // In a real app, this would store the order in a database
152 // and potentially trigger a WhatsApp notification to the business owner
153

shadow-scrollREADME.md2 matches

@pspeter3โ€ขUpdated 4 days ago
1# Discord Authentication with better-auth and SQLite
2
3This project implements Discord OAuth authentication using the `better-auth` library and Val Town's built-in SQLite database.
4
5## Project Structure
6
7- `/backend/index.ts` - Main entry point for the HTTP API
8- `/backend/database/schema.ts` - Database schema and migrations
9- `/backend/auth/discord.ts` - Discord authentication implementation
10- `/frontend/index.html` - Simple frontend for testing authentication

TownieTODOs.md1 match

@maxmโ€ขUpdated 4 days 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

@maxmโ€ขUpdated 4 days 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."),

Towniesystem_prompt.txt2 matches

@maxmโ€ขUpdated 4 days ago
192```
193โ”œโ”€โ”€ backend/
194โ”‚ โ”œโ”€โ”€ database/
195โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
196โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # DB query functions
252 ```
253
254### Database Patterns
255- Run migrations on startup or comment out for performance
256- Change table names when modifying schemas rather than altering

bookmarksDatabase

@s3thiโ€ขUpdated 3 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 6 months ago