Vals are the building blocks of Val Town. They can be used to create APIs, crons, websites, and email handlers with JavaScript.
A val is a collaborative, versioned folder of deployed code. It includes everything you need to run code in the cloud, including:
- HTTP, Cron, and Email triggers
- Environment variables ↗
- Import from other NPM, JSR, and more ↗
- Access controls ↗
- Version control & collaboration: reversions, branching, remixes, pull requests
- The Deno runtime ↗
- Logs & traces
Triggers
Section titled “Triggers”There are 3 types of triggers that JavaScript files within a val can have:
HTTP Triggered by https requests. You can make APIs or websites
Cron Triggered by a timer or cron expression
Email Triggered by an incoming email
Versioning & Collaboration
Section titled “Versioning & Collaboration”Every file change is automatically versioned. Rollbacks are instantaneous. You can create branches and remixes for development and collaborating.
Branches Create branches for feature development, testing, and sharing
Remixes Remix another user's val to make changes and send a pull request
Pull Requests Merge changes from a branch or remix back into the parent val