Strait Docs
CLI

Commands for starting and managing Strait server components.

serve

Start Strait server components.

FlagTypeDefaultDescription
--modestringallComponent mode (api, worker, all)
strait serve --mode all

Running the strait binary with no subcommand is equivalent to running strait serve.

server start

Equivalent to the serve command.

FlagTypeDefaultDescription
--modestringallComponent mode (api, worker, all)
strait server start --mode api

Server Modes

Strait can be run in different modes to allow for independent scaling of components:

  • api: Handles HTTP requests, API endpoints, and webhooks. Use this mode for scaling the web-facing layer.
  • worker: Executes jobs and workflows. Use this mode for scaling the processing power of the system.
  • all: Runs both API and worker components in a single process. This is ideal for local development or small-scale deployments.

In production, it is recommended to run api and worker modes separately to ensure that heavy job execution does not impact API responsiveness.

Was this page helpful?

On this page