Commands for starting local SHAR server instances for development and testing.

Subcommands

shar

Starts a SHAR server instance (requires external NATS server).

Usage:

shar serve shar

Example:

shar serve shar

Note: This command starts only the SHAR server. You must have a NATS server running separately. Use the global --server flag to specify the NATS server address.


all

Starts both a SHAR server and an embedded NATS server.

Usage:

shar serve all [flags]

Flags:

  • -s, --server <address> - Sets the address of a NATS server (optional, starts embedded NATS if not specified)
  • -l, --log-level <level> - Sets the logging level (default: “info”)
  • -c, --concurrency <num> - Sets the concurrent level of the SHAR listeners (default: 10)

Example:

# Start SHAR with embedded NATS server
shar serve all

# Start with custom settings
shar serve all --log-level debug --concurrency 20

# Start SHAR pointing to external NATS
shar serve all --server nats://127.0.0.1:4222

Output: Runs until interrupted with Ctrl+C (SIGINT) or SIGTERM.

Use Case: Perfect for local development and testing when you need a complete SHAR environment without managing separate NATS infrastructure.