Unlisted
Like
vt-tests
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v16View latest version
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a Deno project configured for Val Town development. The project uses TypeScript with Val Town-specific types and has experimental features enabled for Node.js compatibility.
- Lint:
deno lint
- Type Check:
deno check [file.ts]
- Run:
deno run [file.ts]
- Locking is disabled (
"lock": false
) - Compiler options are relaxed (
noImplicitAny: false
,strict: false
) - Val Town types are included from
https://www.val.town/types/valtown.d.ts
- Experimental Node.js globals, Temporal API, and worker options are enabled
Always check the the Documentation if you are unsure how to do a thing which is available under https://docs.val.town/ or as repo at https://github.com/val-town/val-town-docs.
File Naming Conventions:
- HTTP triggers:
*.http.tsx
- Cron triggers:
*.cron.tsx
- Email triggers:
*.email.tsx
Standard Val Town Imports:
import { blob } from "https://esm.town/v/std/blob";
import { sqlite } from "https://esm.town/v/std/sqlite";
import { OpenAI } from "https://esm.town/v/std/openai";
import { email } from "https://esm.town/v/std/email";
Key Development Rules:
- Generate code in TypeScript/TSX
- Never embed secrets - use environment variables with
Deno.env.get()
- Use
https://esm.sh
for npm dependencies - SQLite: Change table names when modifying schemas instead of altering tables
- Use
new Response(null, { status: 302, headers: { Location: "/path" }})
for redirects