Update: use Clojure CLI, reitit over Leiningen approach
Instead of lein ring server and having to set up an nrepl connection to the running process (or use wrap-reload), you can start a repl in the project and then start the ring server (jetty, etc) from inside the repl (or evaluating some commented out code in the source file)
Starting the ring server inside the clojure-jack-in repl will block further input at the REPL buffer.
Use the join? option to be able to interact with repl after starting a ring server
Set join? to false to continue using the repl after starting the server and allows request handlers to be changed without restarting the repl or server.
-dev-main function is often created to set different code for development. This is also suggested by lein-ring for including wrap-reload.
-repl-main could be a function that is configured to start the ring server using the join? option
Instead of lein ring server and having to set up an nrepl connection to the running process (or use wrap-reload), you can start a repl in the project and then start the ring server (jetty, etc) from inside the repl (or evaluating some commented out code in the source file)
Starting the ring server inside the
clojure-jack-in
repl will block further input at the REPL buffer.Use the join? option to be able to interact with repl after starting a ring server
Set join? to
false
to continue using the repl after starting the server and allows request handlers to be changed without restarting the repl or server.-dev-main function is often created to set different code for development. This is also suggested by lein-ring for including wrap-reload.
-repl-main could be a function that is configured to start the ring server using the join? option
join? option - set to false to prevent the server blocking https://ring-clojure.github.io/ring/ring.adapter.jetty.html