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=279&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 2798 results for "database"(417ms)

trackESMContentmain.tsx3 matches

@shouser•Updated 2 months ago
15}
16
17async function initializeDatabase() {
18 await sqlite.execute(`
19 CREATE TABLE IF NOT EXISTS ${TABLE_NAME} (
27
28export default async function(interval: Interval) {
29 await initializeDatabase();
30
31 for (const url of URLS) {
65
66export async function getAllVersions() {
67 await initializeDatabase();
68 const versions = await sqlite.execute(`SELECT * FROM ${TABLE_NAME} ORDER BY timestamp DESC`);
69 console.log(versions, TABLE_NAME);

prolificPinkGulltest.ts1 match

@chris_st•Updated 2 months ago
1import { createClient } from "jsr:@supabase/supabase-js@2";
2
3const connectionString = Deno.env.get('DATABASE_URL')
4const supabaseUrl = Deno.env.get('SUPABASE_URL')
5const supabaseKey = Deno.env.get('SUPABASE_ANON_KEY')

prolificPinkGullREADME.md1 match

@chris_st•Updated 2 months ago
1### Example project with Supabase
2
3This is an example ValTown project that uses Supabase both as a database and an authorization service.

sqliteExplorerAppREADME.md1 match

@shouser•Updated 2 months ago
30- [ ] add triggers to sidebar
31- [ ] add upload from SQL, CSV and JSON
32- [ ] add ability to connect to a non-val town Turso database
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable

yc_findermain.tsx3 matches

@stevekrouse•Updated 5 months ago
40 <li>We extract email domains from your user list</li>
41 <li>
42 We match these domains against our database of YC companies (sourced{" "}
43 <a href="https://docs.google.com/spreadsheets/d/181GQmXflgMCCI9awLbzK4Zf0uneQBKoh51wBjNTc8Us/edit?gid=0#gid=0">
44 here
45 </a>
46 , cached <a href="https://www.val.town/v/stevekrouse/yc_database">here</a>)
47 </li>
48 <li>You get a detailed report of matches, enriched with YC company data</li>
226
227export default async function server(request: Request): Promise<Response> {
228 const companies = await fetch("https://stevekrouse-yc_database.web.val.run").then(res => res.json());
229 const url = new URL(request.url);
230 if (url.pathname === "/companies.json") {

listSqliteTablesREADME.md1 match

@nbbaier•Updated 1 year ago
1# listSqliteTables
2
3Returns a flat array of the names of all tables in your Val Town SQLite database.
4
5```ts

sqliteDumpREADME.md1 match

@nbbaier•Updated 1 year ago
1# SQLite Dump Util
2
3A utility function that generates SQL statements to dump the data and schema of tables in a SQLite database.
4
5## Usage