GenHTTP Lambda Docs

Concepts

Apps, addresses and keys

What an app is on GenHTTP Lambda, the two keys every app has, where an app answers, and how apps are created, taken offline and deleted.

An app - a lambda in the API and the tools - is a small web service: C# code that returns a GenHTTP handler, the files it serves, and the data it keeps. The server compiles it within seconds and runs it inside the server’s process, next to every other app. Most apps are written by an agent; you can read and change the code whenever you like. What an app is made of is described in App code.

Two keys#

Every app has two keys, and no accounts stand behind them.

Key Looks like What it does
Public key tasks Names the app’s address. Can be changed later.
Editor key 32 random letters and digits Opens the editor at /editor/<editor key> and authorizes every change through the API, MCP and git.

The editor key is the app’s only credential. Anybody who has it can change, take offline, download and delete the app, and the platform cannot recover a lost one. The app’s git address contains it too.

Changing the public key (Change the address in the editor’s menu) moves the app at once: its old address stops working, so update whatever links to it.

Where an app answers#

An app always answers at the root of an address of its own. Which form that address takes is the operator’s choice, and the same code runs at all of them:

Form Example Set up by
By path - the default https://lambda.example.com/lambda/tasks/ nothing beyond the server’s address
At a subdomain https://tasks.apps.example.com/ the operator, with LAMBDA_HOSTING_URL and a wildcard DNS record
At a domain of its own https://tasks.example.com/ the owner, for an app in the production or system tier

Below a path, every app shares the platform’s origin in the browser. That suits apps you and your team build; an installation that hosts apps of strangers gives them subdomains. Addresses, HTTPS and domains explains both, and what each needs.

Because the address can differ, an app links to its own pages, scripts and API relatively (api/items, never /api/items). The same rule lets a draft’s preview work below /features/…/.

Online and offline#

An app is online while one of its versions is deployed; at most one is. Taking it offline (Take offline in the editor’s menu) keeps its code and data; deploying any version brings it back. An offline app’s address shows a page saying nothing is online there.

Apps in the sandbox tier go offline by themselves after 30 days without visits or changes, and are removed once 90 days have passed without either. See Tiers and limits.

Creating an app#

  • Ask an agent - it calls create_lambda, writes the code and deploys it. See Connect an agent.
  • The create page at /editor/create - start empty, or from one of the demos.
  • The build agent at /build, where the operator set it up - describe the app in a sentence, no agent of your own needed. See Building without code.
  • The REST API - POST /api/v1/lambdas. See REST API.

The answer always carries the editor key. Nothing is online until a version is deployed.

Demos#

Every installation keeps five finished apps online, each showing one way to build something:

Demo Shows
demo-crud records behind a REST API, with a page and tools for agents
demo-registration accounts, login and a members’ page
demo-files uploads kept in the workspace
demo-live a page that updates live, with server-sent events
demo-game a multiplayer game over a websocket

Their editor key is their public key, so anybody can read them at /editor/demo-crud, and agents read them before writing similar code. They cannot be changed; start a lambda of your own from it in their editor creates a copy that is yours.

Deleting an app#

Delete this lambda in the editor’s menu removes every version, all of the app’s data, its history and its address, for good. A downloaded copy (Download as a .NET project) keeps running anywhere .NET runs - see Domains, showcase and source.