Embedded HTTP server for the spel Observability Dashboard.
Serves a single-page web UI that shows live browser state: viewport screenshot, action log, console messages, and uncaught errors.
Uses only JDK built-in com.sun.net.httpserver — no external deps, GraalVM native-image safe.
Usage: (start-dashboard! 4848 state-fn) ;; starts HTTP server (stop-dashboard!) ;; stops it (dashboard-running?) ;; status check
Embedded HTTP server for the spel Observability Dashboard. Serves a single-page web UI that shows live browser state: viewport screenshot, action log, console messages, and uncaught errors. Uses only JDK built-in com.sun.net.httpserver — no external deps, GraalVM native-image safe. Usage: (start-dashboard! 4848 state-fn) ;; starts HTTP server (stop-dashboard!) ;; stops it (dashboard-running?) ;; status check
(dashboard-port)Returns the port the dashboard is listening on, or nil.
Returns the port the dashboard is listening on, or nil.
(dashboard-running?)Returns true if the dashboard HTTP server is running.
Returns true if the dashboard HTTP server is running.
(start-dashboard! port state-fn)Starts the dashboard HTTP server on the given port.
Params:
port - Long. TCP port to listen on.
state-fn - Function of zero args returning a map with keys:
:page-fn — fn of zero args returning the current Page (or nil)
:state — daemon state map (derefed atom)
:console — vector of console message maps
:errors — vector of error maps
:activity — vector of action-log entries
Returns: The HttpServer instance.
Starts the dashboard HTTP server on the given port.
Params:
`port` - Long. TCP port to listen on.
`state-fn` - Function of zero args returning a map with keys:
:page-fn — fn of zero args returning the current Page (or nil)
:state — daemon state map (derefed atom)
:console — vector of console message maps
:errors — vector of error maps
:activity — vector of action-log entries
Returns:
The HttpServer instance.(stop-dashboard!)Stops the dashboard HTTP server.
Stops the dashboard HTTP server.
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 |