I found this example:
https://gist.github.com/raw/887596/d5804f1e7c550cd4c25e1194c58190e816ceadb0/core.clj

here:
http://www.myclojureadventure.com/2011/03/getting-started-with-ring-and-compojure.html

Just substitute your app-routes for handler and put the (run-jetty) form in
your -main method.

Tony



On Wed, Jan 9, 2013 at 2:58 PM, John Gabriele <jmg3...@gmail.com> wrote:

> On Wednesday, January 9, 2013 1:26:07 PM UTC-5, Phil Hagelberg wrote:
>>
>>
>> I recommend simply embedding jetty and writing a -main function that
>> uses run-jetty. Then you can just ship an uberjar out to deploy.
>>
>
> Ok. Suppose I've got a stock webapp generated via
>
>     lein new compojure my-webapp
>
> I can of course (thanks to the nice template and lein-ring) run this
> sparkling new webapp via `lein ring server`.
>
> In src/my_webapp/handler.clj I've got an ns declaration, a `(defroutes
> app-routes (GET ...) ... (route/not-found ...))`, and a `(def app
> (handler/site app-routes))`. That's it.
>
> 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?
>
> Thanks!
> ---John
>
>  --
> 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
>

-- 
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

Reply via email to