Create a web service in Clojure without start/stopping the server
The problem using Jetty (or Netty or Ring) is that after you start the process, your beloved REPL is "binded" to the server thus forcing you to kill the service, make a change, start the process again, refresh and do it again. Not fun at all. It's easy to run the process "in the background" and have the REPL available to make changes.
Let's create a new project (using lein).
> lein new TinyService
Now, we need a project.clj (so we can do a lein deps and have everything installed automagically)
> lein deps
Edit core.clj with this:
You can run the service in REPL by (boot) and then you'll still have access to REPL. You can change stuff, C+c C+c, refresh and voila! You can even connect to web server (to a JVM to be more exact) and make changes without the need for compilation. And all this from your local emacs!
Enjoy!
