# Val Town Documentation ## Getting Started - [Your first cron val](https://docs.val.town/quickstarts/first-cron.md): Make your first cron val - a weather notifier - [Your first website val](https://docs.val.town/quickstarts/first-website.md): Make your first website val - a personal site - [LLM prompting](https://docs.val.town/quickstarts/prompting.md): A guide to LLM prompting and using AI inside Val Town ## Vals - [Cron (Scheduled)](https://docs.val.town/vals/cron.md): Schedules let code on Val Town run every day, every hour, or whenever you'd like - [Email](https://docs.val.town/vals/email.md): A kind of val that is able to receive emails sent to it. - [Express](https://docs.val.town/vals/express.md): A way to implement a web server on val town using a subset of the express.js api - [Overview](https://docs.val.town/vals.md): Learn about the basics of Vals - [Script](https://docs.val.town/vals/script.md): The most flexible kind of val, a way to run any TypeScript and JavaScript - [Basic examples](https://docs.val.town/vals/http/basic-examples.md): Examples of basic HTTP vals for common use cases - [CDNs and Cache Control](https://docs.val.town/vals/http/cdns.md): How to use Content Delivery Networks (CDNs) and cache control headers with HTTP vals - [Custom domains](https://docs.val.town/vals/http/custom-domains.md): Point your own domains to any HTTP val - [Custom subdomains](https://docs.val.town/vals/http/custom-subdomains.md): Choose custom subdomains of val.run for HTTP vals in projects - [Early Return](https://docs.val.town/vals/http/early-return.md): How to return a response early from an HTTP val - [HTTP](https://docs.val.town/vals/http.md): A kind of val that can serve a website or an API using web-standard Request & Response objects. - [HTML & JSX](https://docs.val.town/vals/http/jsx.md): You can use JSX syntax in Val Town to render HTML using React, Preact, Vue, Solid, etc. - [Routing](https://docs.val.town/vals/http/routing.md): How to implement routing in HTTP vals to handle different paths and methods ## Projects - [Branches](https://docs.val.town/projects/branches.md): Project Branches are used for feature development, testing, and sharing - [Overview](https://docs.val.town/projects.md): Learn about the basics of Projects - [Pull Requests](https://docs.val.town/projects/pull-requests.md): Pull Requests are used to merge changes from a branch or fork back into the parent - [Remixes](https://docs.val.town/projects/remixes.md): Other users can remix your Project, and you can remix other user’s Projects. ## Reference - [Bot rate limiting](https://docs.val.town/reference/bot-rate-limiting.md): Some bots are rate limited across all Vals - [Environment variables](https://docs.val.town/reference/environment-variables.md): Using environment variables to store secrets that vals can securely access - [esm.town](https://docs.val.town/reference/esm-town.md): Endpoint for getting val source code - [Importing](https://docs.val.town/reference/import.md): Import code from vals, NPM, JSR, and URLs - [Permissions](https://docs.val.town/reference/permissions.md): Vals can be private, unlisted, or public - [Runtime](https://docs.val.town/reference/runtime.md): Val Town uses the Deno runtime to run your code - [Version Control](https://docs.val.town/reference/version-control.md): Every time you save a val it creates a new immutable version in the version history. - [Keyboard shortcuts](https://docs.val.town/reference/shortcuts.md): Keyboard shortcuts for Val Town - [Townie](https://docs.val.town/reference/townie.md): Use the AI assistant Townie to create or edit vals ## Standard Library - [Blob Storage](https://docs.val.town/std/blob.md): Store and retrieve binary data with Val Town's blob storage system - [OpenAI](https://docs.val.town/std/openai.md): Integrate with OpenAI's APIs to add AI capabilities to your vals - [Proxied fetch](https://docs.val.town/std/fetch.md): Make HTTP requests to external services using Val Town's proxied fetch - [SQLite](https://docs.val.town/std/sqlite.md): Val Town SQLite is a lightweight, standard database. Every Val Town account comes with its own private SQLite database that is accessible from any of your vals. - [ORMs](https://docs.val.town/std/sqlite/orms.md): Using Object-Relational Mapping libraries with Val Town SQLite - [Migrations](https://docs.val.town/std/sqlite/migrations.md): How to manage database schema changes with migrations in Val Town SQLite - [Usage](https://docs.val.town/std/sqlite/usage.md): How to use Val Town SQLite, with examples. - [Email](https://docs.val.town/std/email.md): Send emails programmatically from your vals using Val Town's email API ## REST API - [Overview](https://docs.val.town/api.md): 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](https://docs.val.town/api/authentication.md): How to authenticate to Val Town using API Tokens - [JavaScript SDK](https://docs.val.town/api/sdk.md): Interact with Val Town via the TypeScript SDK to programmatically create and update vals, get user information, and much more. ## Troubleshooting - [CORS](https://docs.val.town/troubleshooting/cors.md): Understanding Cross-Origin Resource Sharing (CORS) in Val Town - [Migrating Deprecated HTTP Vals](https://docs.val.town/troubleshooting/migrating-deprecated-http-vals.md): Learn how to migrate your HTTP vals to the new runtime - [Serialization](https://docs.val.town/troubleshooting/serialization.md): Val Town tries to serialize and deserialize as many types as it can, but doing that for all JavaScript is unfortunately very hard - [Exports](https://docs.val.town/troubleshooting/exports.md): Vals with triggers (HTTP, Cron, Email) require at least one export. - [Upgrade Guide: Safer Val Scopes](https://docs.val.town/troubleshooting/std-set-permission-error.md): How to upgrade your vals for the safer default scopes rolled out to everyone on Feb 11, 2025 - [Permission errors](https://docs.val.town/troubleshooting/permission-errors.md): Vals run in a sandbox that doesn’t permit access to the filesystem, or to execute arbitrary scripts. - [Express to HTTP migration](https://docs.val.town/troubleshooting/express-to-http-migration.md): How to migrate existing vals from the deprecated express type to the HTTP type ## Guides - [Creating a webhook](https://docs.val.town/guides/creating-a-webhook.md): Use Val Town to receive HTTP webhooks from services like Discord or Stripe - [Generate PDFs](https://docs.val.town/guides/generate-pdfs.md): Using jsPDF, you can generate PDFs from scratch and download them from Val Town. - [Embedding Vals in other sites](https://docs.val.town/guides/embed.md): Any val can be embedded as an iframe on other sites - [Push notifications](https://docs.val.town/guides/push-notifications.md): Using the third-party service ntfy.sh, you can send push notifications to phones and computer with Val Town. - [QR Code](https://docs.val.town/guides/qr-code.md): Val Town can be used as a way to generate QR Codes. - [RSS](https://docs.val.town/guides/rss.md): Val Town can both parse and generate RSS feeds for blogs and other updated sources - [Save HTML form data](https://docs.val.town/guides/save-html-form-data.md): Save HTML form data on Val Town - [Saving data from a web page](https://docs.val.town/guides/saving-data-from-a-web-page.md): Save data from a web page on Val Town - [Website Uptime Tracker](https://docs.val.town/guides/website-uptime-tracker.md) - [Web scraping](https://docs.val.town/guides/web-scraping.md): Use Val Town to write a web scraper to extract content from websites - [Weather](https://docs.val.town/guides/weather.md): Build weather related apps with Val Town - [Interop with Node, Deno, and Browsers](https://docs.val.town/guides/interop.md): Learn how to run your vals in different runtimes ## Integrations - [Airtable](https://docs.val.town/integrations/airtable.md): You can use Airtable with Val Town to store data or load edited data from other sources - [Browserbase](https://docs.val.town/integrations/browserbase.md): How to use Browserbase & Puppeteer to with Val Town - [Browserless](https://docs.val.town/integrations/browserless.md): How to use Browserless to scrape websites with Val Town - [Google Sheets](https://docs.val.town/integrations/google-sheets.md): Using the Google Sheets API, you can add rows to a spreadsheet with Val Town. - [Steel](https://docs.val.town/integrations/steel.md): How to use Steel & Puppeteer to with Val Town - [SQLite wasm](https://docs.val.town/integrations/sqlite-wasm.md): Using Deno's ability to load WASM modules, you can actually run SQLite right in Val Town. - [Stripe](https://docs.val.town/integrations/stripe.md): Accept payments in Val Town using Stripe - [Telegram bot](https://docs.val.town/integrations/telegram.md): Create a Telegram bot that can receive and respond to messages on Val Town - [AWS S3](https://docs.val.town/integrations/s3.md): S3 is Amazon's very popular object storage system. You can upload & download objects on S3 using Val Town. - [Discord welcome bot](https://docs.val.town/integrations/discord/bot.md): Create a Discord bot that sends a DM to new users. - [Discord bot](https://docs.val.town/integrations/discord/how-to-make-a-discord-bot-hosted-24-7-for-free-in-.md): How to make a Discord bot hosted 24/7 for free in 6 steps - [Send Discord message via webhook](https://docs.val.town/integrations/discord/send-message.md): Shows you how to receive webhooks from Discord on Val Town. - [Slack bot](https://docs.val.town/integrations/slack/bot.md): Create a Slack bot that replies to mentions - [Send messages to Slack](https://docs.val.town/integrations/slack/send-messages-to-slack.md): Create a bot that sends new messages into a Slack channel. - [Neon Postgres](https://docs.val.town/integrations/databases/neon-postgres.md): How to integrate with Neon, a hosted Postgres platform that does horizontal scaling and includes an SQL-over-HTTP API. - [PlanetScale](https://docs.val.town/integrations/databases/planetscale.md): How to store data in PlanetScale, a hosted MySQL platform with the ability to scale beyond a single instance and evolve schemas. - [Supabase](https://docs.val.town/integrations/databases/supabase.md): How to connect Val Town to Supabase, a hosted Postgres-as-a-platform that lets you make queries via HTTP. - [Get a Github user](https://docs.val.town/integrations/github/get-a-github-user.md): Get a user without passing an authentication token on Val Town. - [Upstash](https://docs.val.town/integrations/databases/upstash.md): Using Upstash, a hosting provider that provides free 1MB Redis instances. - [Github user's stars (pagination)](https://docs.val.town/integrations/github/github-users-stars-pagination.md): Get a user's stars across all their repositories on GitHub - [Receiving a GitHub Webhook](https://docs.val.town/integrations/github/receiving-a-github-webhook.md): Send yourself an email / Slack / Discord notification when someone stars your GitHub repository ## Optional - [Discord](https://discord.gg/dHv45uN5RY) - [Email](mailto:docs-help@val.town) - [Blog](https://blog.val.town/)