function | previously cljs.repl.browser/start-server | Edit |
(start opts)
Start the server on the specified port.
(defn start
[opts]
(let [ss (ServerSocket. (:port opts))]
(.start
(Thread.
((ns-resolve 'clojure.core 'binding-conveyor-fn)
(fn [] (server-loop opts ss)))))
(swap! state (fn [old] (assoc old :socket ss :port (:port opts))))))