Skip to content

routeup exec

routeup exec runs one command with the Routeup project environment. It does not start the agent, register or expose a route, allocate a port, or wait for a service to become ready.

Use it when routeup serve owns the route and other processes need the same URLs or local CA trust:

terminal
# Terminal 1: own the route
routeup serve
# Other terminals: run independent processes with the project environment
routeup exec -- yarn start:dev
routeup exec -- yarn start:consumer:sync
routeup exec -- yarn start:consumer:webhook

Stopping an exec command does not remove the route. The route remains active until the separate routeup serve process stops.

exec preserves the existing environment and adds Routeup’s project context:

HOST=127.0.0.1
PORT=<configured target port, when present>
ROUTEUP_LOCAL_URL=https://example-app.localhost
ROUTEUP_URL=https://example-app.localhost
NODE_EXTRA_CA_CERTS=/Users/me/.routeup/ca.crt

The project-local node_modules/.bin directory is also prepended to PATH. When the route already has an active public exposure, ROUTEUP_URL contains that public URL instead. ROUTEUP_LOCAL_URL always stays local.

These values are a snapshot taken when the process starts. A later exposure change does not modify the environment of a running process.

With an explicit command, put every command argument after --:

terminal
routeup exec -- yarn test
routeup exec -- node scripts/seed.js

The explicit argument vector is executed without shell interpolation. It takes precedence over a configured runner command.

With no arguments, exec uses the same configured command as bare routeup:

terminal
routeup exec
  • A package.json routeup.script resolves the named package script.
  • A routeup.json command runs as a shell command.
  • If neither is configured, pass a command after --.

exec owns only the process it starts. It forwards terminal input and signals, stops remaining descendants when the command exits, and returns the child’s exit code. It does not restart the command or coordinate it with other processes.

The injected URL describes the project route but does not guarantee it is active. Run routeup serve separately when the command needs to reach that route.