basilisp.contrib.nrepl-server¶
A port of nbb ‘s nREPL server implementation to Basilisp.
- typeStreamOutFn¶
- Var ops[source]¶
A map of operations supported by the nREPL server (as keywords) to function handlers for those operations.
- fn (server-make opts)[source]¶
Create and return a
socketserver.TCPServerserving nREPL clients according toopts.See
opsfor the operations supported by the server.The nREPL starts at the
usernamespace and binds *1, *2, *3 and *e to the ultimate, penultimate, antepenultimate evaluation result and last exception message respectively.optsis a map of options with the following optional keys:- keyword
:host: The host address to bind to, defaults to
127.0.0.1- keyword
:port: The port number to listen to, defaults to
0which means to pickup a random available port.
See
on-connectfor additionally supportedoptskeys.Warning
All client connections share the same environment at the moment, which is the env that the server runs in. This could change in the future to isolate the clients interactions from each other.
Note
The session UUIDs are ignored and only created to satisfy the initial clone op.
- keyword
- fn (start-server!)[source]¶
- fn (start-server! opts)
Create an nREPL server with
server-makeaccording tooptsand serve clients forever.It prints out the
nrepl-server-signaturemessage at startup for IDEs to pickup the host number to connect to.optsis a map of options with the following optional keys:- keyword
:host: The host address to bind to, defaults to
127.0.0.1- keyword
:port: The port number to listen to, defaults to
0which means to pickup a random available port.- keyword
:nrepl-port-file: The file to write the port number to, it defaults to .nrepl-port.
- keyword
:server*: A promise object that will receive the server reference from
server-makewhen is made avaiable.
See also
- keyword