nx_audit_server_main.nx
buildroot/runtime/nx_audit_server_main.nx
about
nx_audit_server_main.nx -- live phase-2 dashboard server.
Composes the full phase-2 chain end-to-end (per
NISHI_AUDIT_DASHBOARD_ROADMAP.md):
nx_http_server -- bind/listen/accept on 127.0.0.1:8472
nx_pages_static -- file-backed route handler
nx_path_canonicalize -- CWE-22 prevention at URL boundary
Serves docs/audit/index.html under URL path /audit/index.html
(plus snapshot.json under /audit/snapshot.json). Accepts ONE
request then exits -- this is a deterministic bench probe, not
a daemon. For daemon mode, caller wraps in a loop + supervisor
(nx_supervisor.nx queued).
Usage from bench/nx_pages_static_loopback.sh:
./nx_audit_server &
curl http://127.0.0.1:8472/audit/index.html | diff - docs/audit/index.html
wait
expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls_x86_64.nxnx_http_server.nxnx_pages_static.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 28 | const NX_AUDIT_PORT: i64 = 51847 |
| 29 | const NX_AUDIT_REQ_CAP: i64 = 8192 |
| 30 | const NX_AUDIT_RESP_CAP: i64 = 524288 // 512 KB (dashboard HTML ~13 KB) |
functions
| 32 | func main() -> i64 |