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=255&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 2800 results for "database"(595ms)

fixItWanddrizzle.config.ts1 match

@wolf•Updated 4 weeks ago
7 out: "./backend/drizzle",
8 dbCredentials: {
9 url: process.env.DATABASE_URL!,
10 },
11});

reactHonoStarterREADME.md1 match

@shortdiv•Updated 4 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.

Emailsreciever1 match

@avycado13•Updated 4 weeks ago
39 } catch (error) {
40 console.error("Failed to save email:", error);
41 // throw new Error("Failed to save email to database");
42 }
43}

email_capture_system_2routes.ts5 matches

@prashamtrivedi•Updated 4 weeks ago
6import { cors } from "https://esm.sh/hono@4.0.9/cors?dts";
7import { ProjectStatus, ApiResponse, CreateProjectRequest, CreateSubscriberRequest } from "../shared/types.ts";
8import { initDatabase } from "../database/migrations.ts";
9import {
10 createProject,
17 getProjectsByEmail,
18 getAllSubscribers
19} from "../database/queries.ts";
20import { sendNewSubscriberNotification, sendWelcomeEmail } from "./email-service.ts";
21import { isValidEmail, logger } from "./utils.ts";
24const api = new Hono();
25
26// Initialize database on startup
27initDatabase().catch(error => {
28 logger.error('Failed to initialize database', error);
29 throw error;
30});
6import { email } from "https://esm.town/v/std/email";
7import { logger } from "./utils.ts";
8import { getAllProjects, getSubscribersByProjectId } from "../database/queries.ts";
9import { sendWelcomeEmail } from "./email-service.ts";
10

email_capture_system_2queries.ts1 match

@prashamtrivedi•Updated 4 weeks ago
1/**
2 * Database queries for the email capture system
3 */
4

email_capture_system_2migrations.ts6 matches

@prashamtrivedi•Updated 4 weeks ago
1/**
2 * Database migrations for the email capture system
3 */
4
10
11/**
12 * Initialize database tables
13 */
14export async function initDatabase() {
15 console.log('Initializing database...');
16
17 // Create projects table
57 `);
58
59 console.log('Database initialized successfully');
60}
61
62// Only run this file when executed directly
63if (import.meta.main) {
64 await initDatabase();
65}
66

email_capture_system_2README.md4 matches

@prashamtrivedi•Updated 4 weeks ago
1# Email Capture System
2
3A system to capture emails from various landing pages, identify them to projects, and store them in a database.
4
5## Features
6
7- Database for storing emails and projects
8- REST API for email capture and project management
9- Admin panel to manage projects and emails
13## Project Structure
14
15- `backend/`: Server-side code including API routes and database access
16- `frontend/`: Admin panel UI code
17- `shared/`: Shared types and utilities
18- `database/`: Database schema and queries
19

fixItWandimport_map.json1 match

@wolf•Updated 1 month ago
1{
2 "imports": {
3 "@neondatabase/serverless": "npm:@neondatabase/serverless",
4 "drizzle-orm/neon-http": "npm:drizzle-orm/neon-http",
5 "drizzle-kit": "npm:drizzle-kit@^0.30.5",

FarcasterGalleryREADME.md1 match

@moe•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/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.