Commit ce51c6f 1 parent 55f94d0 commit ce51c6f Copy full SHA for ce51c6f
File tree 2 files changed +14
-9
lines changed
2 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -111,14 +111,16 @@ The following options affect the behavior of the web server started by
111
111
If true, automatically refresh the browser when source or resource
112
112
files are modified. Defaults to false.
113
113
114
- * ` :nrepl ` -
115
- A map of ` :start? ` and (optionally) ` :port ` keys. If ` :start? ` is true,
116
- open up an nREPL server on the given port. ` :start? ` defaults to false,
117
- ` :port ` defaults to an arbitrary free port. __ NOTE: This option is only
118
- for development with the ` lein ring server ` task. Setting this option
119
- will not cause a generated uberjar/uberwar to run an nREPL server. If
120
- you would like to run an nREPL server in your production app, then see
121
- the clojure.tools.nrepl.server project.__
114
+ * ` :nrepl ` -
115
+ A map of ` :start? ` and (optionally) ` :port ` and ` :bind ` keys. If
116
+ ` :start? ` is true, open up an nREPL server on the given
117
+ port. ` :start? ` defaults to false, ` :port ` defaults to an arbitrary
118
+ free port, and ` :bind ` defaults to ` "localhost" ` . __ NOTE: This
119
+ option is only for development with the ` lein ring server ` task.
120
+ Setting this option will not cause a generated uberjar/uberwar to
121
+ run an nREPL server. If you would like to run an nREPL server in
122
+ your production app, then see the clojure.tools.nrepl.server
123
+ project.__
122
124
123
125
## Executable jar files
124
126
Original file line number Diff line number Diff line change 52
52
~@(map #(if (symbol? %) (list 'var %) %) middleware)))
53
53
54
54
(defn start-nrepl-expr [project]
55
- (let [port (-> project :ring :nrepl (:port 0 ))
55
+ (let [nrepl-opts (-> project :ring :nrepl )
56
+ port (:port nrepl-opts 0 )
57
+ bind (:bind nrepl-opts)
56
58
handler (nrepl-handler (nrepl-middleware project))]
57
59
`(let [{port# :port } (clojure.tools.nrepl.server/start-server
58
60
:port ~port
61
+ :bind ~bind
59
62
:handler ~handler)]
60
63
(doseq [port-file# [" target/repl-port" " .nrepl-port" ]]
61
64
(-> port-file#
You can’t perform that action at this time.
0 commit comments