Running local dev processes: from terminal tabs to a process manager

A local dev stack is several long-running processes: a web server, an API, a queue worker, often a database. Something has to start them, keep their output, decide what happens when one crashes, and give each a port. Terminal tabs cover two servers. A Procfile runner or concurrently covers a repeatable set, Docker Compose covers services that already run as containers, and a process manager adds restarts, logs that outlive a terminal, and health checks. Pick the lightest option that fixes the problem you actually have.

Updated

Four problems every approach has to solve

Judge any setup by four questions. Where does each server’s output go, and can you read it after the terminal closes? What happens when one process crashes? What happens when two want the same port? Can a teammate, or you next Monday, start the whole set without remembering the order? Run multiple dev servers locally answers them for terminal tabs, tmux, concurrently, Procfile runners, Docker Compose, and Rig in one comparison table.

The pieces

  • A process manager starts programs, tracks them, captures their output, and decides what happens when they exit. A task runner finishes when its command does, and a viewer such as top does not own the processes it lists.
  • A Procfile lists one process per line as a name, a colon, and a command. Heroku defines the format and other runners read it, so each tool decides for itself what it accepts. The Procfile guide covers syntax and runners, and the Procfile validator checks a file line by line.
  • A sidecar process is a helper that runs beside the main app, such as a queue worker. Nothing ties it to the web server except whoever starts both.
  • A health check is a small, repeatable request that says whether a service is alive and able to work. Listening on a port is not the same as being healthy.
  • A reverse proxy accepts requests on behalf of a backend. Locally, it often puts HTTPS in front of a plain HTTP dev server.

Reading order

  1. Read the comparison guide to choose an approach.
  2. If you choose a Procfile, read the Procfile guide, then check your file with the Procfile validator.
  3. Add health checks once the start order matters, and read the sidecar process entry if you run workers.
  4. Ports are the usual next problem, so continue with ports and conflicts.

How Rig fits

Rig is a process manager for local dev servers. It detects package.json scripts, a Procfile, and a Compose file in a project and offers each as a script to start. It keeps one log per project, polls health over HTTP, and, when a project has auto-restart switched on, restarts a crashed process with backoff. Procfile projects, Health-aware start order, and the Mac process manager page describe it.

Limits

A Procfile only says what to run: it installs nothing and builds nothing, and runners differ on what happens when one process exits, so kill a worker once and watch. Compose runs your code in a container, so live editing needs a bind mount or Compose Watch. Rig’s health check is an HTTP request, so a worker with no URL reads as unknown, and a 404 counts as healthy.

Tools in this topic

Guides in this topic

Glossary terms in this topic

Knowledge base articles in this topic

Blog posts in this topic

Comparisons in this topic

Pages in this topic

Frequently asked questions

How do I run a frontend and an API together?

Use two terminal tabs, or one concurrently script if you want a single command. Add structure when you start missing crashes, hitting port clashes, or forgetting the start order. The comparison guide sets out the options against four problems: output, crashes, ports, and repeatability.

Does a Procfile need a web process?

Only if the app serves HTTP traffic on Heroku. There, web is the only process type that receives traffic from the platform’s routers, and its command must bind to the port in the PORT variable. Locally, nothing routes traffic by process type, so any process can serve HTTP.

When is a process manager worth installing?

When the manual approach has a visible cost: you restart the same servers daily, ports collide, or a crash goes unnoticed. Until then, a script or a Procfile is enough.

What is the difference between a liveness check and a readiness check?

Liveness asks whether a process is still working, or stuck so badly that restarting it is the right move. Readiness asks whether it can take traffic right now. A server can be alive while it warms a cache or waits for a database. On a laptop the check is usually one HTTP request with a short timeout.

See how Rig fits in

Rig is a Mac app that starts, stops, and watches the processes in a project from one window. The knowledge base explains each part in plain language.

Related

Section links

https://userig.app/learn/local-dev-processes