On Wed, Jan 9, 2013 at 4:27 PM, John Gabriele <jmg3...@gmail.com> wrote:
> On Wednesday, January 9, 2013 4:08:50 PM UTC-5, Phil Hagelberg wrote: >> >> >> John Gabriele writes: >> > >> and this in main.clj: >> >> (defn -main [& [port]] >> (let [port (Integer. (or port (System/getenv "PORT") 5000))] >> (jetty/run-jetty #'app {:port port :join? false})))) >> > What namespace is main.clj defining? It needs to have :gen-class added to it. Minimally, it could be (ns my-webapp.main [[some dependencies here]] :gen-class) You could also move -main into my-webapp.handler (and add :gen-class to that ns declaration). ~~~clojure > (defproject my-webapp "0.1.0-SNAPSHOT" > :description "FIXME: write description" > :url "http://example.com/FIXME" > :dependencies [[org.clojure/clojure "1.4.0"] > [compojure "1.1.3"] > [ring/ring-jetty-adapter "1.1.6"]] > :plugins [[lein-ring "0.7.5"]] > :ring {:handler my-webapp.handler/app} > :profiles > {:dev {:dependencies [[ring-mock "0.1.3"]]}} > :main my-webapp.main > ) > ~~~ > > I'm guessing there's a `:main` missing in there. What should its value be? > Yes, it needs to be whatever the name of the namespace is that contains your -main function. That namespace must have :gen-class in its definition. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en