I think my code is almost the same:
(ns caiba-data.nrepl
(:require [mount.core :as mount :refer [defstate]]
[clojure.tools.nrepl.server :refer [start-server stop-server]]))
(defn start-nrepl []
(start-server :bind "0.0.0.0" :port 7888))
(defstate nrepl
:start (start-nrepl)
:stop (stop-server nrepl))
and I use mount/start
in my core
ns.
other state works fine, except nrepl.BTW, If I just use start-nrepl
, it works fine.
the exception is coming from db.clj
line 13
what is that line, and do you have require
s in that namespace?
if you can create an example (with all ns involved) that I can look at, it'll be easier for me to help