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.
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:- the box you wired it to, if any
- otherwise, the org’s shared instance of that service
- otherwise, your own dev box of that service from the same worktree
- otherwise, nothing, and
tesser devtells you which port and how to fix it
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: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 expectslocalhost:5432 to be a database, borrow a service’s for the run: