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?q=database&page=220&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 7058 results for "database"(1727ms)

bedtime-story-timemigrations.ts2 matches

@dthyresson•Updated 2 weeks ago
25}
26
27// Initialize the database
28export async function initializeDatabase() {
29 await createStoriesTable();
30}

bedtime-story-timeREADME.md1 match

@dthyresson•Updated 2 weeks ago
17## Project Structure
18
19- `/backend` - API routes, database, and story generation
20- `/frontend` - UI components, emoji selectors, and gallery
21- `/shared` - Shared types and utilities

TyappValchat.ts1 match

@oluwa_ty•Updated 2 weeks ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { cors } from "https://esm.sh/@hono/cors@0.0.6";
3import { getAllChatMessages, createChatMessage } from "../database/queries.ts";
4import type { ChatMessageFormData } from "../../shared/types.ts";
5

TyappValjobs.ts1 match

@oluwa_ty•Updated 2 weeks 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 2 weeks 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 2 weeks 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 2 weeks 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 2 weeks 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 2 weeks 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 2 weeks 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

bookmarksDatabase

@s3thi•Updated 3 months ago

sqLiteDatabase1 file match

@ideofunk•Updated 6 months ago