Skip to content

feat: add --bind and --port options to jetzig server CLI#243

Closed
gumruyanzh wants to merge 1 commit intojetzig-framework:mainfrom
gumruyanzh:cli-server-bind-port
Closed

feat: add --bind and --port options to jetzig server CLI#243
gumruyanzh wants to merge 1 commit intojetzig-framework:mainfrom
gumruyanzh:cli-server-bind-port

Conversation

@gumruyanzh
Copy link

Summary

  • Adds --bind / -b and --port / -p options to the jetzig server CLI command
  • Forwards these options to the compiled application executable when spawning it

Problem

The server application already supports --bind and --port via Environment.zig, but the jetzig server CLI command didn't expose or forward these options. Users had to run the compiled binary directly to change the bind address or port.

Usage

jetzig server --bind 0.0.0.0 --port 3000
jetzig server -b 0.0.0.0 -p 3000

Defaults remain 127.0.0.1:8080 for backward compatibility. Non-default values are forwarded to the spawned executable as --bind and --port arguments.

Test plan

  • zig build succeeds
  • zig build test --summary all - all tests pass

Closes #161

🤖 Generated with Claude Code

The server application already supports --bind and --port via
Environment.zig, but the `jetzig server` CLI command didn't expose
these options or forward them to the spawned executable.

Now users can run:
  jetzig server --bind 0.0.0.0 --port 3000
  jetzig server -b 0.0.0.0 -p 3000

Options are forwarded to the compiled application when spawning it.
Defaults remain 127.0.0.1:8080 for backward compatibility.

Closes #161

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gumruyanzh gumruyanzh closed this by deleting the head repository Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suggestion for --hostname and --port Parameters

1 participant