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%20%22Image%20title%22?q=database&page=274&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 7182 results for "database"(2579ms)

cosmoyeauth.ts1 match

@hailsโ€ขUpdated 3 weeks ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { createUser, getUserByEmail } from "../database/queries.ts";
3import { sign } from "https://esm.sh/jsonwebtoken@9.0.2";
4import { compare, hash } from "https://esm.sh/bcrypt@5.1.1";

cosmoyepayment.ts3 matches

@hailsโ€ขUpdated 3 weeks ago
1import { createPayment, updateOrderStatus } from "../database/queries.ts";
2import { OrderStatus, PaymentResponse } from "../../shared/types.ts";
3
24 const transactionId = `txn_${Date.now()}_${Math.floor(Math.random() * 1000000)}`;
25
26 // Record the payment in the database
27 await createPayment(
28 orderId,
52// Get available payment methods
53export function getPaymentMethods() {
54 // In a real application, this might come from a database or payment gateway API
55 return [
56 { id: "credit_card", name: "Credit Card" },

cosmoyeauth.ts2 matches

@hailsโ€ขUpdated 3 weeks ago
1import { Context, Next } from "https://esm.sh/hono@3.11.7";
2import { getUserById } from "../database/queries.ts";
3import { verify } from "https://esm.sh/jsonwebtoken@9.0.2";
4
19 const decoded = verify(token, jwtSecret) as { userId: number };
20
21 // Get the user from the database
22 const user = await getUserById(decoded.userId);
23

cosmoyeREADME.md2 matches

@hailsโ€ขUpdated 3 weeks ago
32
33- **Framework**: Hono (TypeScript)
34- **Database**: SQLite
35- **Authentication**: JWT
36- **Payment Processing**: Stripe API integration
40```
41โ”œโ”€โ”€ backend/
42โ”‚ โ”œโ”€โ”€ database/
43โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
44โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # DB query functions

jobindex.ts2 matches

@zaaynaahโ€ขUpdated 3 weeks ago
2import { cors } from "https://esm.sh/hono@3.11.7/middleware";
3import { readFile, serveFile } from "https://esm.town/v/std/utils/index.ts";
4import { runMigrations } from "./database/migrations.ts";
5import {
6 createJobPosting,
9 createChatMessage,
10 getChatMessages
11} from "./database/queries.ts";
12import { parseProject } from "https://esm.town/v/std/utils/index.ts";
13

jobqueries.ts1 match

@zaaynaahโ€ขUpdated 3 weeks ago
65}
66
67// Helper functions to map database rows to TypeScript types
68function mapJobRow(row: any): JobPosting {
69 return {

Newindex.ts2 matches

@technicalmickeyโ€ขUpdated 3 weeks ago
2import { cors } from "https://esm.sh/hono@3.11.7/cors";
3import { readFile, serveFile } from "https://esm.town/v/std/utils@85-main/index.ts";
4import { runMigrations } from "./database/migrations.ts";
5import authRoutes from "./routes/auth.ts";
6import eventRoutes from "./routes/events.ts";
7import registrationRoutes from "./routes/registrations.ts";
8
9// Initialize database
10await runMigrations();
11

Newregistrations.ts1 match

@technicalmickeyโ€ขUpdated 3 weeks ago
7 getEventById,
8 isUserRegistered
9} from "../database/queries.ts";
10import { jwtMiddleware } from "./auth.ts";
11import { ApiResponse, Registration } from "../../shared/types.ts";

Newevents.ts1 match

@technicalmickeyโ€ขUpdated 3 weeks ago
8 getEventRegistrations,
9 isUserRegistered
10} from "../database/queries.ts";
11import { jwtMiddleware } from "./auth.ts";
12import {

Newauth.ts1 match

@technicalmickeyโ€ขUpdated 3 weeks ago
2import { jwt } from "https://esm.sh/hono@3.11.7/jwt";
3import * as bcrypt from "https://esm.sh/bcrypt@5.1.1";
4import { createUser, getUserByEmail } from "../database/queries.ts";
5import { LoginRequest, RegisterRequest, AuthResponse, ApiResponse } from "../../shared/types.ts";
6import { sanitizeUser, isValidEmail, isEmptyString } from "../../shared/utils.ts";

bookmarksDatabase

@s3thiโ€ขUpdated 3 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 6 months ago