$PORT (default 8080); the Python, Go, and Quarkus scaffolds export a handler and the server is run for you. Local development is therefore unremarkable: run the program, curl localhost:8080, iterate, then telnyx-edge ship.
Everything below runs against the projects generated by telnyx-edge new-func (see the Quickstart); the Python and Go serve rows add a small local entry point shown in their tabs:
Run and test, by language
- TypeScript / JavaScript
- Python
- Go
- Java (Quarkus)
The scaffold’s The
index.ts (or index.js) at the project root is a node:http server. Build (TypeScript only) and run it:npm run dev runs index.ts directly through ts-node with no build step. The server reads process.env.PORT and falls back to 8080.Exercise it with curl:/health fast-path at the top of the scaffold answers the platform’s probes — keep it fast and dependency-free when you rework the server.The scaffold starts its server at module load and exports nothing, so there is nothing to import in a unit test. Keep request handling in exported functions the server delegates to, test those with node --test, and treat curl against the running server as your integration test.Testing
A standalone function needs no emulator: the platform runs your program in a container and sends it HTTP, which is exactly what your terminal just did — the language-standard tools above are the whole testing story. (Projects that add Stateful Actors run locally withtelnyx-edge dev; see its docs.)
The one structural habit worth adopting: keep transport separate from logic. Parse, validate, and compute in plain functions; let the server (or Handle, or handle) stay a thin adapter. That keeps unit tests fast and keeps the binding limitation below out of most of your test suite.
Framework servers
For TypeScript and JavaScript, the platform contract is a process that binds the port in$PORT (default 8080). Any HTTP server that does so runs in the container — Express, Fastify, Hono, or anything else — and the server you ran locally is the server that runs deployed. There are no framework-specific guides.
Bindings and secrets
Theenv binding surface — [telnyx] clients, env.SECRETS.get(), KV namespaces, actors — resolves only inside a deployed function. A standalone function has no local binding emulation — to exercise binding-backed code paths, ship to a scratch function and curl its live URL. (Stateful Actors projects are the exception: telnyx-edge dev runs their actor stack locally so env.<BINDING> calls resolve.)
Plain environment variables are the exception. In production, secrets created with telnyx-edge secrets add <key> <value> are injected as environment variables into your functions, and declaring a [telnyx] binding injects TELNYX_API_KEY. Code that reads plain env vars therefore works locally by exporting the same names:
Deploy
When it works locally, ship it:telnyx-edge revisions list <function> shows them and telnyx-edge rollback <function> <revision-id> retargets traffic to an earlier one. See Deploy.
Next Steps
- Deploy — ship, revisions, and rollback
- HTTP handler — the exact entrypoint contract per language
- Bindings — the
envsurface a deployed function gets - CLI reference — every
telnyx-edgecommand