Getting started
Introduction
Foundry runs your code at the edge — no servers to manage, no regions to pick. Write a function, push it, and it's live in every city within seconds.
What is Foundry
Foundry is a platform for deploying small, fast functions close to your users. You bring the code; Foundry handles the runtime, the routing, and the scaling. Each deploy is immutable and instantly reversible, so shipping never feels risky.
Prerequisites
@foundry/cli package is all you install locally.How it works
A function is a single file that exports a handler. Foundry wraps it, deploys it to the edge network, and gives you a URL. Here's the smallest one that does something useful:
export default function handler(req: Request) { const name = new URL(req.url).searchParams.get("name") ?? "world"; return new Response(`Hello, ${name}!`); }
Deploy it with a single command. Foundry builds it, uploads it, and prints the live URL:
$ foundry deploy hello.ts ✓ built in 0.4s ✓ deployed to 38 regions → https://hello.acme.foundry.app
Under the hood, every deploy gives you:
- An immutable URL you can roll back to at any time.
- Automatic HTTPS and a global anycast address.
- Logs and metrics streamed live from every region.
Next steps
Pick up where it gets practical:
Quickstart
Deploy your first function in three commands.
Authentication
Create keys and sign your requests.