Usage
The base command starts the server:
qaws [options]Default behavior:
host: 0.0.0.0
port: 80
serve: ./publicUse a high port for local development:
qaws --host 127.0.0.1 --port 8080 --serve ./publicCommands
| Command | Purpose |
|---|---|
qaws | Start the server. |
qaws help | Print usage. |
qaws version | Print the current version. |
qaws check --config qaws.json | Validate config and serve directory without starting. |
qaws status | Check a daemon by PID file or derived identity. |
qaws stop | Stop a daemon with SIGTERM. |
qaws stop --force | Escalate to SIGKILL after timeout. |
qaws restart | Stop and start a daemon using the same identity. |
Flags
| Flag | Default | Purpose |
|---|---|---|
--host <addr> | 0.0.0.0 | Address to bind. |
--port <port> | 80 | Port to bind. |
--serve <directory> | ./public | Directory to serve. |
--config <path> | none | Load strict JSON config. |
-d | foreground | Start as a daemon on supported Unix targets. |
--pid-file <path> | derived | Daemon PID file. |
--log-format plain | plain | Human-readable logs. |
--log-format jsonl | plain | JSON-lines logs. |
--log-file <path> | stderr or derived | Write logs to a file. |
--access-log | enabled | Enable access logs. |
--no-access-log | enabled | Disable access logs. |
--keep-alive | enabled | Enable HTTP keep-alive. |
--no-keep-alive | enabled | Disable HTTP keep-alive. |
--sendfile | enabled | Enable platform sendfile. |
--no-sendfile | enabled | Disable platform sendfile. |
--keep-alive-timeout-ms <n> | 5000 | Idle keep-alive timeout. |
--max-requests-per-connection <n> | 1000 | Per-connection request cap. |
--max-connections <n> | 1024 | Active plus queued connection cap. |
--workers <n> | topology-selected | Explicit event or fallback-worker count. |
Boolean flag pairs exist so CLI flags can override config in both directions.
For example, a config file can enable access logs while one command run uses
--no-access-log.
Config precedence
qaws loads defaults first, then applies config, then applies CLI flags.
qaws --config qaws.json --port 18086 --no-access-logIn this example, --port and --no-access-log override the JSON file.
Daemon mode
Start a daemon:
qaws -d --host 127.0.0.1 --port 18086 --serve ./publicCheck it:
qaws status --host 127.0.0.1 --port 18086Stop it:
qaws stop --host 127.0.0.1 --port 18086Restart it:
qaws restart --host 127.0.0.1 --port 18086 --serve ./publicUse explicit files when you want stable process identity:
qaws -d --pid-file /tmp/qaws.pid --log-file /tmp/qaws.log --port 18086
qaws status --pid-file /tmp/qaws.pid
qaws stop --pid-file /tmp/qaws.pid --forceIf no PID or log file is configured, qaws derives paths from the bind host and
port under $XDG_RUNTIME_DIR/qaws, then $PREFIX/var/run/qaws on Termux, then
/tmp/qaws-$UID.
Daemon control is Unix/Termux-first. Windows foreground serving works, but daemon commands report unsupported.