fix: add address to config, along with --host flag #1

Merged
w33ble merged 0 commits from fix/bind-address-config into main 2026-05-08 17:16:42 -06:00
w33ble commented 2026-05-08 17:16:07 -06:00 (Migrated from git.w33ble.com)

Changes made:

  1. src/config.zig - Added address: ?[]const u8 = null field to Config
  2. src/main.zig:
    • Added --host flag parsing
    • Resolution order: --host flag → cfg.address → "127.0.0.1" (default)
    • Updated bind address and log message to use the resolved host

Usage:

Flag (highest precedence)

nulltickets --host 0.0.0.0 --port 7700

Or in config.json

{
  "address": "0.0.0.0",
  "port": 7700
}

For Docker, run with --host 0.0.0.0 to allow external/container connections.

# Changes made: 1. src/config.zig - Added address: ?[]const u8 = null field to Config 2. src/main.zig: - Added --host flag parsing - Resolution order: --host flag → cfg.address → "127.0.0.1" (default) - Updated bind address and log message to use the resolved host ## Usage: Flag (highest precedence) ```sh nulltickets --host 0.0.0.0 --port 7700 ``` Or in config.json ```json { "address": "0.0.0.0", "port": 7700 } ``` For Docker, run with --host 0.0.0.0 to allow external/container connections.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
w33ble/nulltickets!1
No description provided.