Skip to content

CLI Flag port

Manech Dubreil edited this page Oct 21, 2026 · 1 revision

--port <port>

Status: ✅ Implemented (#44)

Port the server listens on. Server mode only.

Usage

transf-orm --serveur --port 8080
transf-orm --serveur --port 0      # any free port

Behavior

  • Default: 3000.
  • 0 lets the OS pick any free port.
  • Requires --serveur: transf-orm --port 0 prints an error and exits with status 2.
  • --ip <address> and --host <host> are planned with #91.

Implementation

  • ServerArgs in crates/server/src/lib.rs (#[arg(long, default_value_t = 3000, requires = "serveur")]). Flattened into the binary's parser so --help lists it.
  • Test: conflicting_modes_exit_with_2 in crates/transf-orm/tests/dispatch.rs.

← CLI

Clone this wiki locally