Thanks to technomancy for the very nice basic Clojure webapp template. Very cool.
On Wed, Jan 9, 2013 at 7:08 PM, Phil Hagelberg <[email protected]> wrote: > > John Gabriele writes: > > > What would I need to do in order to embed jetty so I can create an > uberjar > > (`lein uberjar`) and deploy it (I suppose via: `java -jar > > my-webapp-0.1.0-standalone.jar &`)? > > > > What would need to be added to / changed in the project.clj? > > > > What exactly should the `-main` look like? > > All it takes is this in project.clj: > > [ring/ring-jetty-adapter "1.1.6"] > > 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})))) > > Of course adjust #'app to wrap with middleware appropriate for your app. > The batteries-included (drawbridge, wrap-error-page, cookie sessions) > template is here: > > > https://github.com/technomancy/lein-heroku/blob/master/lein-template/src/leiningen/new/heroku/web.clj > > -Phil > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to [email protected] > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
