Val Town
docs.val.town
Websites- [Overview](https://docs.val.town/vals.md): Learn about the basics of Vals
llms.txt
Val Town Documentation
Vals
- Overview: Learn about the basics of Vals
- Branches: Val Branches are used for feature development, testing, and sharing
- Cron: Schedules let code on Val Town run every day, every hour, or whenever you'd like
- Email: A kind of val that is able to receive emails sent to it.
- History: View a val's history and revert when needed
- HTTP: A kind of val that can serve a website or an API using web-standard Request & Response objects.
- Basic examples: Examples of basic HTTP triggers for common use cases
- CDNs and Cache Control: How to use Content Delivery Networks (CDNs) and cache control headers with HTTP vals
- Custom domains: Point your own domains to any HTTP val
- Custom subdomains: Choose custom subdomains of val.run for HTTP vals in projects
- Early Return: How to return a response early from an HTTP trigger
- HTML & JSX: You can use JSX syntax in Val Town to render HTML using React, Preact, Vue, Solid, etc.
- Routing: How to implement routing within HTTP triggers to handle different paths and methods
- Val Limitations: Learn about the limitations of vals
- Organizations: Collaborate with your team
- Pull Requests: Pull Requests are used to merge changes from a branch or remix back into the parent
- Remixes: Other users can remix your Val, and you can remix other user's Vals.
Guides
- Store data in Airtable: You can use Airtable with Val Town to store data or load edited data from other sources
- Auth: Add authentication and users to your Val Town app
- Browserbase: How to use Browserbase & Puppeteer to with Val Town
- Browserless: How to use Browserless to scrape websites with Val Town
- Kernel: How to use Kernel with Val Town
- Steel: How to use Steel & Puppeteer to with Val Town
- Creating a webhook: Use Val Town to receive HTTP webhooks from services like Discord or Stripe
- Neon Postgres: How to integrate with Neon, a hosted Postgres platform that does horizontal scaling and includes an SQL-over-HTTP API.
- PlanetScale: How to store data in PlanetScale, a hosted MySQL platform with the ability to scale beyond a single instance and evolve schemas.
- Prisma Postgres: How to connect Val Town to Prisma Postgres, a serverless Postgres database with instant provisioning and zero setup.
- Supabase: How to connect Val Town to Supabase, a hosted Postgres-as-a-platform that lets you make queries via HTTP.
- Upstash: Using Upstash, a hosting provider that provides free 1MB Redis instances.
- Discord welcome bot: Create a Discord bot that sends a DM to new users.
- Discord bot: How to make a Discord bot hosted 24/7 for free in 6 steps
- Send Discord message via webhook: Shows you how to receive webhooks from Discord on Val Town.
- Embedding Vals in other sites: Any val can be embedded as an iframe on other sites
- Your first scheduled cron: Make your first cron job - a weather notifier
- Your first website: Make your personal website
- Generate PDFs: Using jsPDF, you can generate PDFs from scratch and download them from Val Town.
- Get a Github user: Get a user without passing an authentication token on Val Town.
- Github user's stars (pagination): Get a user's stars across all their repositories on GitHub
- Receiving a GitHub Webhook: Send yourself an email / Slack / Discord notification when someone stars your GitHub repository
- Send & receive Gmail: How to use Gmail with Val Town
- Store data in a Google Sheet: Using the Google Sheets API, you can add rows to a spreadsheet with Val Town.
- In, Val, Out: Manage input (like user signups) and automate output (e.g., Slack messages)
- Interop with Node, Deno, and Browsers: Learn how to run your vals in different runtimes
- Social listening with Octolens: Track company mentions on X, Reddit, LinkedIn, etc.
- Overview: A guide to using AI inside and outside Val Town
- ChatGPT: Bring Val Town to ChatGPT
- Claude (Desktop): Bring Val Town to Claude
- Claude Code: Bring Val Town to Claude Code with the Val Town MCP server
- vt CLI: A guide to using the Val Town CLI with your favorite AI tool
- Cursor: Bring Val Town to Cursor with the vt CLI
- GitHub Copilot: Bring Val Town to GitHub Copilot with the vt CLI
- MCP: A guide to using the Val Town MCP server
- Codex: Bring Val Town to OpenAI Codex with the vt CLI or MCP
- Plugin: Use Val Town with coding agents
- Townie: Townie, the Val Town coding agent
- Warp: Bring Val Town to Warp with the vt CLI
- Windsurf: Bring Val Town to Windsurf with the vt CLI
- Zed: Bring Val Town to Zed with the vt CLI
- Push notifications: Using the third-party service ntfy.sh, you can send push notifications to phones and computer with Val Town.
- QR Code: Val Town can be used as a way to generate QR Codes.
- RSS: Val Town can both parse and generate RSS feeds for blogs and other updated sources
- Store data in AWS S3: S3 is Amazon's very popular object storage system. You can upload & download objects on S3 using Val Town.
- Save HTML form data: Save HTML form data on Val Town
- Saving data from a web page: Save data from a web page on Val Town
- Slack agent: BYOA (Bring Your Own Agent) to Slack
- Slack bot: Create interactive Slack bots that respond to mentions, slash commands, and user interactions
- Sending Slack messages: Send notifications and alerts to Slack channels from Val Town
- SQLite wasm: Using Deno's ability to load WASM modules, you can actually run SQLite right in Val Town.
- Stripe webhooks: Accept payments in Val Town using Stripe
- Supabase webhooks: Handle Supabase webhooks in Val Town
- Telegram bot: Create a Telegram bot that can receive and respond to messages on Val Town
- Weather: Build weather related apps with Val Town
- Web scraping: Use Val Town to write a web scraper to extract content from websites
- Website Uptime Tracker
Reference
- Overview: Val Town's REST API allows you to programmatically manage your account and its resources - vals, blob storage, sqlite databases, likes, comments, and more.
- Authentication: How to authenticate to Val Town using API Tokens
- JavaScript SDK: Interact with Val Town via the TypeScript SDK to programmatically create and update vals, get user information, and much more.
- Deno LSP: Understanding the Val Town language server
- Environment groups: Share environment variables in organizations
- Environment variables: Using environment variables to store secrets that vals can securely access
- esm.town: Endpoint for getting val source code
- File I/O: How to read and write files in Val Town
- Using images in vals: Hosting images in Val Town and elsewhere
- Importing: Import code from vals, NPM, JSR, and URLs
- Permissions: Vals can be private, unlisted, or public
- Runtime: Val Town uses the Deno runtime to run your code
- Keyboard shortcuts: Keyboard shortcuts for Val Town
- Blob Storage: Store and retrieve binary data with Val Town's blob storage system
- Email: Send emails programmatically from your vals using Val Town's email API
- Proxied fetch: Make HTTP requests to external services using Val Town's proxied fetch
- OpenAI: Integrate with OpenAI's APIs to add AI capabilities to your vals
- SQLite: Val Town SQLite is a lightweight, standard database. Every Val comes with its own private SQLite database that is accessible from any of your vals.
- Admin: Administration panels for the SQLite databases
- Global: Account-scoped SQLite databases
- Migrations: How to manage database schema changes with migrations in Val Town SQLite
- ORMs: Using Object-Relational Mapping libraries with Val Town SQLite
- Usage: How to use Val Town SQLite, with examples.
- Version Control: Every time you save a val it creates a new immutable version in the version history.
Troubleshooting
- Blocked bots: Some bots are blocked across all Vals
- CORS: Understanding Cross-Origin Resource Sharing (CORS) in Val Town
- Exports: Vals with triggers (HTTP, Cron, Email) require at least one export.
- Express to HTTP migration: How to migrate existing vals from the deprecated express type to the HTTP type
- Migrating Deprecated HTTP Vals: Learn how to migrate your HTTP vals to the new runtime
- Permission errors: Vals run in a sandbox that doesn’t permit access to the filesystem, or to execute arbitrary scripts.
- Serialization: Val Town tries to serialize and deserialize as many types as it can, but doing that for all JavaScript is unfortunately very hard
- Upgrade Guide: Safer Val Scopes: How to upgrade your vals for the safer default scopes rolled out to everyone on Feb 11, 2025
Optional
Related
llmtxt.app – AI SEO & Search Engine Optimization Directory
/llms.txt
635 tokens
/llms-full.txt
2,429 tokens
Websites