Quickstart
Create a directory named public:
mkdir -p public
printf '<h1>Bismillah.</h1>\n' > public/index.htmlStart qaws on a high local port:
qaws --host 127.0.0.1 --port 8080 --serve ./publicCheck the response:
curl -i http://127.0.0.1:8080/Expected result:
200 OKServer: qaws/0.2.7Connection: keep-aliveX-Content-Type-Options: nosniff- a weak representation
ETag Accept-Ranges: bytes- the contents of
public/index.html
Run from Docker
The public image is published at ghcr.io/nulldoubt/qaws:
docker run --rm -p 8080:80 -v "$PWD/public:/public:ro" ghcr.io/nulldoubt/qaws:0.2.7The container serves /public on port 80.
Build from source
qaws is a Zig 0.16.0 project with no package dependencies.
git clone https://github.com/nulldoubt/qaws.git
cd qaws
zig build
./zig-out/bin/qaws --host 127.0.0.1 --port 8080 --serve ./publicUse a config file
qaws never auto-loads qaws.json. Pass it explicitly:
qaws.json
{
"listen": { "host": "127.0.0.1", "port": 8080 },
"serve": "./public",
"logging": { "format": "plain", "access": true }
}Validate before starting:
qaws check --config qaws.jsonStart with the config:
qaws --config qaws.jsonCommand-line flags override config values:
qaws --config qaws.json --port 18086 --no-access-log