CLJS prepl daemon lifecycle management. Starts a persistent JVM subprocess running a ClojureScript Node.js prepl server, manages connections, and provides synchronous eval over socket.
CLJS prepl daemon lifecycle management. Starts a persistent JVM subprocess running a ClojureScript Node.js prepl server, manages connections, and provides synchronous eval over socket.
(close-connection! conn)Closes a prepl connection. The daemon process stays alive.
Closes a prepl connection. The daemon process stays alive.
(ensure-prepl! cache-dir)(ensure-prepl! cache-dir opts)Ensures a CLJS prepl daemon is running and returns a connection map {:socket :reader :writer}. Tries existing daemon first, starts new if needed. cache-dir is the base cache directory (e.g. ".apollo-test"). opts may include :clj-aliases to control the daemon subprocess classpath.
Ensures a CLJS prepl daemon is running and returns a connection map
{:socket :reader :writer}. Tries existing daemon first, starts new if needed.
cache-dir is the base cache directory (e.g. ".apollo-test").
opts may include :clj-aliases to control the daemon subprocess classpath.(eval-cljs conn expr-str)Sends a CLJS expression string to the prepl and reads responses until :ret. Returns {:tag :ret :val <string> :ns <string> :ms <number> :out <collected-stdout> :err <collected-stderr>}.
Sends a CLJS expression string to the prepl and reads responses until :ret.
Returns {:tag :ret :val <string> :ns <string> :ms <number>
:out <collected-stdout> :err <collected-stderr>}.(start-daemon! cache-dir)(start-daemon! cache-dir opts)Starts a background JVM subprocess running a CLJS prepl server. Reads stdout until APOLLO_CLJS_PORT=NNNN appears, writes state file, and returns the port number. Throws on timeout or startup failure. opts may include :clj-aliases (default ":cljs") to control the subprocess classpath.
Starts a background JVM subprocess running a CLJS prepl server. Reads stdout until APOLLO_CLJS_PORT=NNNN appears, writes state file, and returns the port number. Throws on timeout or startup failure. opts may include :clj-aliases (default ":cljs") to control the subprocess classpath.
(stop-daemon! cache-dir)Kills the daemon process and cleans up the state file. cache-dir is the base cache directory (e.g. ".apollo-test").
Kills the daemon process and cleans up the state file. cache-dir is the base cache directory (e.g. ".apollo-test").
(try-connect port)Tries to connect to an existing daemon at the given port. Returns {:socket s :reader r :writer w} or nil on failure.
Tries to connect to an existing daemon at the given port.
Returns {:socket s :reader r :writer w} or nil on failure.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 |