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=fetch&page=240&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=fetch

Returns an array of strings in format "username" or "username/projectName"

Found 2440 results for "fetch"(365ms)

OpenTowniegenerateCode.ts1 match

@pomdtr•Updated 2 months ago
26
27export async function generateCodeAnthropic(messages: Message[]): Promise<ValResponse | null> {
28 const system = await (await fetch(`${import.meta.url.split("/").slice(0, -1).join("/")}/system_prompt.txt`)).text();
29
30 const openai = new OpenAI({

OpenTownieindex.tsx1 match

@pomdtr•Updated 2 months ago
26
27 try {
28 const response = await fetch("/", {
29 method: "POST",
30 headers: { "authorization": "Bearer " + bearerToken },

OpenTowniesystem_prompt.txt2 matches

@pomdtr•Updated 2 months ago
155 * The main App component is rendered on the client.
156 * No server-side-specific code should be included in the App.
157 * Use fetch to communicate with the backend server portion.
158 */
159function App() {
178 * Server-only code
179 * Any code that is meant to run on the server should be included in the server function.
180 * This can include endpoints that the client side component can send fetch requests to.
181 */
182export default async function server(request: Request): Promise<Response> {

vbloghono-adapter1 match

@jxnblk•Updated 3 months ago
67 app.get("/posts/:post", route(Post, data));
68
69 return app.fetch;
70}

surprisingEmbeddingsindex2 matches

@tmcw•Updated 3 months ago
113
114 if (working) {
115 return c.text("Sorry, another embedding is being fetched, wait a moment and try again")
116 }
117
274})
275
276export default app.fetch

vblogREADME.md1 match

@jxnblk•Updated 3 months ago
7The `posts` directory contains markdown files.
8It also includes an `index.json` with an array of posts for the blog.
9These posts are fetched as markdown then processed with graymatter and remark to convert them into metadata and HTML.
10
11The `www` val serves the site using the `src/hono-adapter`.

OpenTownieindex1 match

@shouser•Updated 3 months ago
26
27 try {
28 const response = await fetch("/", {
29 method: "POST",
30 headers: { "authorization": "Bearer " + bearerToken },

OpenTowniegenerateCode1 match

@shouser•Updated 3 months ago
26
27export async function generateCodeAnthropic(messages: Message[]): Promise<ValResponse | null> {
28 const system = await (await fetch(`${import.meta.url.split("/").slice(0, -1).join("/")}/system_prompt.txt`)).text();
29
30 const openai = new OpenAI({

reactRouter7server.tsx1 match

@justbe•Updated 3 months ago
5 if (url.pathname == "/js/entry.client.js") {
6 const moduleUrl = new URL("./entry.client.tsx", import.meta.url);
7 return fetch(moduleUrl);
8 }
9 return handler(request);

OpenTowniesystem_prompt.txt2 matches

@shouser•Updated 3 months ago
155 * The main App component is rendered on the client.
156 * No server-side-specific code should be included in the App.
157 * Use fetch to communicate with the backend server portion.
158 */
159function App() {
178 * Server-only code
179 * Any code that is meant to run on the server should be included in the server function.
180 * This can include endpoints that the client side component can send fetch requests to.
181 */
182export default async function server(request: Request): Promise<Response> {

fetchPaginatedData2 file matches

@nbbaier•Updated 5 days ago

tweetFetcher2 file matches

@nbbaier•Updated 1 week ago