Skip to main content
Most apps are several services that find each other at fixed localhost ports. Tesser keeps that on the box: list the ports in the manifest’s [deps], and each one reaches the right copy of the other service.
The app keeps API_URL=http://localhost:5001 and nothing in it changes.

Which copy a dependency reaches

A dependency names a service, not a box. It reaches, in order:
  1. the box you wired it to, if any
  2. otherwise, the org’s shared instance of that service
  3. otherwise, your own dev box of that service from the same worktree
  4. otherwise, nothing, and tesser dev tells you which port and how to fix it
So changing only the frontend needs no wiring: tesser dev web talks to the shared api. When api has no shared instance, tesser dev api and tesser dev web from one worktree reach each other without a wire.

The shared instance

A shared instance is the org’s copy of a service at one commit, with no laptop behind it. It is what everyone’s boxes use for the services they are not working on. Usually CI updates it on every push to main:
This starts a box at that commit, waits until it is healthy, then switches the org over and removes the old one. Run it with an older commit to roll back. Its env comes from tesser env set (see Secrets for shared instances). tesser service show <name> shows a service’s shared instances.

Wiring a dependency

To test two changed services together, wire one to the other:
tesser dev api web does this for you: it wires web’s api to the api box it started. Nothing else is wired for you. A teammate’s box never counts as a same-worktree fallback, and a shared instance’s dependencies never reach anyone’s dev box, so your work in progress can’t affect a teammate. To see a backend change in the browser, run a frontend of your own from a worktree at main and wire it to your backend:

Tests that need the dependencies

A workbench has no dependencies of its own. For a test that expects localhost:5432 to be a database, borrow a service’s for the run:
Dependencies and shared instances has the exact rules: the messages for a missing dependency, how a switch overlaps two commits, waking, and wire errors.