Skip to content

Concepts

npx wawesome init asks you for a Function name and an App slug. Those two words, and three more, are the whole vocabulary.

Four of them nest: a Tenant holds Apps, an App holds Functions, a Function holds versions. The fifth is one run of a Function.

A Tenant is one account and everything it owns: your Apps, your bill, your login, and any deploy credentials you mint.

The CLI and the dashboard call it your workspace, so wawesome whoami prints both the name you chose and the Tenant UUID you did not. Your workspace also has an address — the one you chose when you signed up — and that address is the first half of every URL you deploy on. wawesome workspace rename changes it. After your first deploy, once every 30 days, and the old address redirects to the new one for 90 days.

An App groups the Functions of one project. Its slug is in the public URL, because the App owns the hostname:

https://{workspace}--{app}.wawesome.app/{function}

The separator is doubled because either slug may contain a hyphen of its own. Both halves are hostname labels, which is why init refuses My Client.

Environment variables and the custom domain sit on the App, not on any one Function inside it. Set a variable once and every Function in the App reads it. A slug is unique inside your workspace and not across the platform, so somebody else can have a demo too.

A Function is one JavaScript module whose default export has a fetch handler.

export default {
  async fetch(request: Request): Promise<Response> {
    return Response.json({ ok: true });
  },
};

Its name is a path segment beneath the App’s hostname, and every path under that segment reaches it. A Function named hello answers at /hello, at /hello/orders and at /hello/orders/42. A Function named root answers at the App’s own root instead.

The name is the address, so there is nothing to rename. Change it in wawesome-function.json and the next deploy makes a second Function, while the first stays live. The CLI names both addresses and asks first.

Functions in one App deploy and roll back one at a time. Deploying hello does nothing to checkout beside it.

A deploy makes a version. Versions are numbered from 1 and count up, and one of them is live at a time.

A version carries the files that deploy declared and, where the deploy carried code, the handler. Nothing is inherited from the version before it. Rolling back puts an earlier version back on the address: the platform already holds it, so nothing is built and nothing is uploaded, and the next request arrives on it. Requests already running finish on the version they started on. The dashboard lists your versions and switches between them, and so does wawesome version switch.

An invocation is one run of a Function. A request arrives, your handler answers, the run ends.

Each run has an id, and the response carries it back in x-wawesome-invocation-id, so a caller who saw a failure can hand you the exact run to read with wawesome logs. Your plan counts invocations. A request answered from a version’s files reaches no code, so it opens no invocation and costs bytes rather than compute.

Every header name that starts with x-wawesome- is the platform’s, in both directions. The platform strips them off a request before your handler sees it, and off your response before the caller sees it. One of your own on that prefix is dropped in silence, with nothing said about why, so name yours something else.

That strip is what makes the five below worth reading. No caller can forge one on the way in, and nothing of yours can pass for one on the way out.

Header Direction What it says
x-wawesome-forwarded-prefix inbound The mount taken off the path. Put it back in front of the path you see and you have the URL the caller asked for
x-wawesome-trigger inbound How the run started. caller for a request, schedule for a Schedule, manual for wawesome invoke
x-wawesome-invocation-id outbound The id of this run. Read its logs with npx wawesome logs --invocation <id>
x-wawesome-error outbound There only when the platform failed. Its absence says the status on the wire is your Function’s own
x-wawesome-document outbound The one name here the platform reads off your response. Name a document your deploy carried and it is streamed in place of your body
Word What it is
Environment variable A key and a value on the App, read by every Function in it. Set one --secret and nothing reads it back
Environment Which set of a Function’s deployments a command acts on. production is the default, and the only one the public address serves
Schedule A cron expression in wawesome-function.json that runs a Function on a timer, with nobody waiting for the answer
Custom domain A hostname you own, attached to an App, which then answers there as well as at its wawesome.app address
Deploy credential What a pipeline or an agent authenticates with, where nobody is at a keyboard to log in

Each has a section in the CLI reference.