compute-edge_
▸ Documentation

Get a function on the edge in under a minute.

If you've used npm and you've written a TypeScript function before, you have the prerequisites. The flow is: install the CLI, write a handler, run compute-edge deploy. That's it.

Install the CLI

The CLI is a Node package — everything else (Rust runtime, Python runtime, build tools) is downloaded on first use.

$ npm i -g compute-edge
$ compute-edge --version
compute-edge 0.4.2

$ compute-edge login
opens browser → confirms in dashboard → writes ~/.compute-edge/credentials

Your first function

A function is a single file that exports a default handler. Here is a complete example you can paste:

// hello.ts
export default {
  async fetch(req: Request): Promise<Response> {
    const url = new URL(req.url);
    const name = url.searchParams.get("name") ?? "world";
    return new Response(`hello, ${name}!\n`);
  },
};

If you have used a Worker, a Deno Deploy handler, or an Astro endpoint, this shape will look familiar. We support the standard Request and Response objects; everything else is up to you.

Deploy it

From the directory containing hello.ts:

$ compute-edge deploy
  building hello-world (v0.0.1)...
  ↳ 12 KB bundle, 1 route

  deploying to 14 edge PoPs:
    ✓ adl-01 · Adelaide, AU     284 ms
    ✓ syd-02 · Sydney, AU       190 ms
    ✓ ...
    ✓ iad-01 · Ashburn, US      612 ms

 deployed to https://hello-world.compute-edge.app

That URL resolves to your code at every PoP. Visit it from Sydney and you hit syd-02; visit from Frankfurt and you hit fra-01. You don't pick.

Functions

Functions are HTTP handlers. Each function gets one or more URL routes; we route the request to the nearest PoP and run your code there. Cold starts are typically under 5 ms — we use V8 isolates for JS/TS and WASM for Rust/Python rather than full containers.

Functions can do most of what you'd expect: make outbound HTTP requests, read/write KV, read/write Objects, return streamed responses. They cannot bind raw TCP sockets, fork processes, or use the local file system — if you need those, you want a long-running server, not an edge function.

KV

A distributed key/value store backed by per-PoP SSD. Reads in-region are sub-millisecond; writes are eventually consistent across PoPs (typical convergence: 200–800 ms). Use it for session state, feature flags, rate-limit counters, anywhere you want fast reads of mostly-static data.

const session = await env.KV.get("session:" + token);
await env.KV.put("session:" + token, JSON.stringify(state), { ttl: 3600 });

Objects

S3-compatible blob storage. Drop in for any S3 SDK by pointing at https://<your-org>.objects.compute-edge.net. Replicated to every PoP region, served from the nearest. No egress fees between Objects and Functions on the same PoP.

Routing

By default, every function is reachable at https://<name>.compute-edge.app/*. You can attach a custom domain via the dashboard or with compute-edge domain add. We provision a certificate, point your domain at our anycast IPs, and you're done — usually within 90 seconds.

compute-edge.toml

A minimal config file. Most projects don't need one — we infer the defaults. When you do need overrides, this is the shape:

# compute-edge.toml
name = "hello-world"
main = "./hello.ts"
runtime = "javascript"     # or "rust" / "python"

[deploy]
pops = "all"                # or ["adl-01", "syd-02", ...]
spending_cap_usd = 0

[env]
GREETING = "hello"

CLI commands

The commands you'll use most:

Run compute-edge help <command> for full options on any of them.

Getting help

If something is broken, email [email protected]. If you want to ask a question without making it a support ticket, /contact goes to the same humans. We don't run a community Slack — we found the support quality is higher when conversations stay in writing.

Ready to deploy something real?
Sign up for a free Hobby account, walk through the quickstart, and ship to all 14 PoPs in under five minutes. Create an account →