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=305&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 7578 results for "database"(1436ms)

linkInBioTemplateindex.ts2 matches

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

linkInBioTemplatestatic.ts1 match

@Joeyhanniโ€ขUpdated 1 month 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 { getJobPostings, getChatMessages } from "../database/queries.ts";
4
5const static_routes = new Hono();

linkInBioTemplatechat.ts1 match

@Joeyhanniโ€ขUpdated 1 month ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { createChatMessage, getChatMessages } from "../database/queries.ts";
3
4const chat = new Hono();

linkInBioTemplatejobs.ts1 match

@Joeyhanniโ€ขUpdated 1 month ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { createJobPosting, getJobPostings, getJobPostingById } from "../database/queries.ts";
3
4const jobs = new Hono();

linkInBioTemplatemigrations.ts2 matches

@Joeyhanniโ€ขUpdated 1 month ago
6
7/**
8 * Run database migrations to set up the schema
9 */
10export async function runMigrations() {
31 `);
32
33 console.log("Database migrations completed");
34}

linkInBioTemplateREADME.md2 matches

@Joeyhanniโ€ขUpdated 1 month ago
16
17- Backend: Hono.js API framework
18- Database: SQLite for data persistence
19- Frontend: HTML, JavaScript with Tailwind CSS
20- Data Refresh: Polling for chat updates
24```
25โ”œโ”€โ”€ backend/
26โ”‚ โ”œโ”€โ”€ database/
27โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
28โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # DB query functions

bragreelREADME.md1 match

@lightweightโ€ขUpdated 1 month ago
221. Set up a `CLAUDE_API_KEY` environment variable in Val Town with your Anthropic API key
232. Configure your Notion integration to send webhooks to this endpoint
243. Ensure your Notion database has the following properties:
25 - URL (URL type)
26 - Name (Title type)

bragreelindex.ts2 matches

@lightweightโ€ขUpdated 1 month ago
271 // Try different possible locations for the URL in the Notion payload
272 if (payload.properties && payload.properties.URL && payload.properties.URL.url) {
273 // Database item with URL property
274 url = payload.properties.URL.url;
275 }
276 else if (payload.properties && payload.properties.URL && payload.properties.URL.rich_text &&
277 payload.properties.URL.rich_text.length > 0 && payload.properties.URL.rich_text[0].text) {
278 // Database item with URL in rich text
279 url = payload.properties.URL.rich_text[0].text.content;
280 }

Satrancmigrations.ts1 match

@erensโ€ขUpdated 1 month ago
6const LEAGUE_STANDINGS_TABLE = "chess_league_standings_1";
7
8export async function setupDatabase() {
9 // Create users table
10 await sqlite.execute(`

Satrancindex.ts7 matches

@erensโ€ขUpdated 1 month ago
3import { readFile, serveFile } from "https://esm.town/v/std/utils@85-main/index.ts";
4import { parseProject } from "https://esm.town/v/std/utils@85-main/index.ts";
5import { setupDatabase } from "./database/migrations.ts";
6import { getUsers, createUser, getUserById, updateUserStats } from "./database/queries.ts";
7import { createGame, getGame, updateGameState, getActiveGames, getUserGames } from "./database/game-queries.ts";
8import { getLeagueStandings, updateLeagueStandings } from "./database/league-queries.ts";
9
10// Initialize the Hono app
19app.use("/*", cors());
20
21// Setup database on startup
22app.use("*", async (c, next) => {
23 try {
24 await setupDatabase();
25 } catch (error) {
26 console.error("Database setup error:", error);
27 }
28 return next();

bookmarksDatabase

@s3thiโ€ขUpdated 4 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 6 months ago