Pure-Java HTTP server that serves the pw-report output directory (target/pw-traces by default) so the embedded offline Trace Viewer works correctly in a browser.
The server is built entirely on com.sun.net.httpserver.HttpServer,
which ships with every JDK — no extra dependencies required.
Usage: clojure -M:traces
JVM properties (all optional): -Dpw.server.port=<n> HTTP port (default: 8080) -Dpw.server.dir=<path> Directory to serve (default: target/pw-traces)
Once started, open http://localhost:<port> in your browser. Press Ctrl-C to stop.
Pure-Java HTTP server that serves the pw-report output directory (target/pw-traces by default) so the embedded offline Trace Viewer works correctly in a browser. The server is built entirely on `com.sun.net.httpserver.HttpServer`, which ships with every JDK — no extra dependencies required. Usage: clojure -M:traces JVM properties (all optional): -Dpw.server.port=<n> HTTP port (default: 8080) -Dpw.server.dir=<path> Directory to serve (default: target/pw-traces) Once started, open http://localhost:<port> in your browser. Press Ctrl-C to stop.
(-main & _args)(start-server)(start-server {:keys [port dir]})Start the HTTP server.
Options (all optional): :port — TCP port to listen on (default: 8080, or JVM property pw.server.port) :dir — directory to serve (default: "target/pw-traces", or JVM property pw.server.dir)
Returns the running HttpServer instance.
Start the HTTP server.
Options (all optional):
:port — TCP port to listen on (default: 8080,
or JVM property pw.server.port)
:dir — directory to serve (default: "target/pw-traces",
or JVM property pw.server.dir)
Returns the running HttpServer instance.(stop-server server)Stop a running HttpServer (waits 0 seconds for in-flight requests).
Stop a running HttpServer (waits 0 seconds for in-flight requests).
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |