                               (symbol? %) (iu/require-resolve %)
                               (list? %) (eval %)))
                       (apply nrepl/default-handler)))
-          server (nrepl/start-server :port port :bind host :handler handler)]
+          server (nrepl/start-server :port port :bind interface :handler handler)]
       (u/at-exit (partial stop server))
-      (let [[host bound-port] (nrepl-host-port server)]
-        (iu/info "nREPL bound to" (format "%s:%s" host bound-port))
+      (let [[interface bound-port] (nrepl-interface-port server)]
+        (iu/info (format "nREPL bound to %s:%s" interface bound-port))
         (spit-nrepl-files bound-port port-file)))))

  (.close server))

(defn start
  "Fire up a repl bound to host/port"
  [{:keys [host port port-file] :or {host "localhost", port 0}}]
  (let [{:keys [nrepl-middleware nrepl-handler]}
        (-> (wu/options) (get "repl-options" "{}") read-string)]
    (when (and nrepl-middleware nrepl-handler)

    (spit f port)
    (.deleteOnExit f)))

(defn ^:private nrepl-interface-port [server]
  (let [ss (-> server deref :ss)]
    [(-> ss .getInetAddress .getHostAddress) (.getLocalPort ss)]))

