Fork me on GitHub
#calva
<
2020-10-05
>
Muhammad Muhajir00:10:52

Hi guys, I am trying to start a repl with lein ring server. I can't find a way to do that. I have been searching for the documentation about that. I am pretty new to clojure. If you guys could send me a reference where I can read more about that, that would be helpful. thanks 🙂

pez06:10:34

Hello @muhajirframe, I'm not familiar with lein-ring. Will have a quick look and see what I can figure out.

pez06:10:49

Seems like you can tell lein-ring to start an nrepl server for you: https://github.com/weavejester/lein-ring#web-server-options . Though it is not obvious to me how to provide the options.

pez06:10:49

OK. Figured it out. Put an :nrepl key in the :ring map of project.clj:

:ring {:handler what.ever/handler
         :nrepl {:start? true}}

pez06:10:41

Then start the server (`lein ring server`) , wait for it to tell you that the nREPL server is started, and then connect Calva (`ctrl+alt+c ctrl+alt+c`) and choose Leiningen as project type.