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/$1?q=database&page=6&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 5445 results for "database"(442ms)

ProtoShareadmin.ts1 match

@c15rโ€ขUpdated 23 hours ago
6 deleteContentItem,
7 getContentItemById
8} from "../database/queries.ts";
9import { requireAuth } from "./auth.ts";
10

iptvREADME.md8 matches

@adalante35โ€ขUpdated 23 hours ago
16### ๐Ÿ”ง Management API
17- **RESTful Endpoints**: Complete CRUD operations for channels and playlists
18- **Database Storage**: SQLite with proper indexing and relationships
19- **User Management**: Admin roles and authentication
20- **Stream Monitoring**: Health checks and status tracking
41```
42โ”œโ”€โ”€ backend/
43โ”‚ โ”œโ”€โ”€ database/
44โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Database schema and setup
45โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # Database operations and queries
46โ”‚ โ”œโ”€โ”€ routes/ # API endpoints (integrated in index.ts)
47โ”‚ โ””โ”€โ”€ index.ts # Main Hono server with all routes
108- `ADMIN_PASSWORD` - Admin access password (optional)
109
110### Database
111- **Auto-Migration**: Database schema is created automatically on startup
112- **SQLite Storage**: Persistent storage with proper indexing
113- **Default Admin**: Admin user created automatically if none exists
169### Backend Stack
170- **Hono**: Fast and lightweight web framework
171- **SQLite**: Embedded database with full SQL support
172- **TypeScript**: End-to-end type safety
173- **Val Town**: Serverless hosting and deployment
175### Performance Optimizations
176- **Server-Side Rendering**: Initial data injection for faster loading
177- **Database Indexing**: Optimized queries for large channel lists
178- **Lazy Loading**: Progressive loading of channel data
179- **Caching**: Efficient data caching and state management

ProtoSharemigrations.ts2 matches

@c15rโ€ขUpdated 23 hours ago
2
3export async function runMigrations() {
4 console.log("Running database migrations...");
5
6 // Users table
75 await sqlite.execute(`CREATE INDEX IF NOT EXISTS idx_challenges_email ON webauthn_challenges (email)`);
76
77 console.log("Database migrations completed successfully");
78}

ProtoShareREADME.md3 matches

@c15rโ€ขUpdated 23 hours ago
16```
17โ”œโ”€โ”€ backend/
18โ”‚ โ”œโ”€โ”€ database/
19โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Database schema
20โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # Database operations
21โ”‚ โ”œโ”€โ”€ routes/
22โ”‚ โ”‚ โ”œโ”€โ”€ auth.ts # WebAuthn authentication

iptvindex.ts4 matches

@adalante35โ€ขUpdated 23 hours ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { readFile, serveFile } from "https://esm.town/v/std/utils@85-main/index.ts";
3import { runMigrations, createDefaultAdmin } from "./database/migrations.ts";
4import * as db from "./database/queries.ts";
5import type {
6 Channel,
14const app = new Hono();
15
16// Initialize database on startup
17await runMigrations();
18await createDefaultAdmin();
275 }
276
277 // Save channels to database
278 const channelIds: string[] = [];
279 for (const channel of parseResult.playlist.channels) {

iptvmigrations.ts2 matches

@adalante35โ€ขUpdated 23 hours ago
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
2
3// Database schema for IPTV Platform
4export async function runMigrations() {
5 // Users table
110 await sqlite.execute(`CREATE INDEX IF NOT EXISTS idx_epg_channel_time ON epg_programs(channel_id, start_time)`);
111
112 console.log("Database migrations completed successfully");
113}
114

untitled-923index.ts1 match

@Piyush1234โ€ขUpdated 1 day ago
63 const body = await c.req.json();
64
65 // Here you would typically save to database or send email
66 console.log("Contact form submission:", body);
67

PetWebsiteindex.ts4 matches

@Aditi_Deshmukhโ€ขUpdated 1 day ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { runMigrations, seedData } from "./database/migrations.ts";
3import auth from "./routes/auth.ts";
4import pets from "./routes/pets.ts";
14});
15
16// Initialize database on startup
17try {
18 await runMigrations();
19 await seedData();
20 console.log("Database initialized successfully");
21} catch (error) {
22 console.error("Database initialization failed:", error);
23}
24

PetWebsitestore.ts1 match

@Aditi_Deshmukhโ€ขUpdated 1 day ago
11 createOrderItems,
12 getOrdersByUser
13} from "../database/queries.ts";
14import type { ApiResponse, Product, Order } from "../../shared/types.ts";
15

PetWebsiteservices.ts1 match

@Aditi_Deshmukhโ€ขUpdated 1 day ago
8 createVetAppointment,
9 getVetAppointmentsByUser
10} from "../database/queries.ts";
11import type { ServiceBookingForm, ApiResponse, GroomingAppointment, VetAppointment } from "../../shared/types.ts";
12

bookmarksDatabase

@s3thiโ€ขUpdated 3 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 6 months ago