If you want to deploy a Clojure/Compojure application you’re going to need a couple hints.
First, in project.clj you’re going to need to add an item to :dependencies and :main.
I have some extra dependencies such as hiccup that aren’t strictly necessary. The ring/ring-jetty-adapter is most important.
under :main write the name of the module that has your (defroutes), we’re going to add a -main function to the same file.
Now in projectname.handler add :gen-class and ring.adapter.jetty to (use).
Lower in the same file, include a new function called -main. This is the function java will call to start the server.
In this case my defroutes was named app-routes so that’s what goes after run-jetty.
That’s it. You should be able to