I started working on some clojure web applications and decided to use the Ring + Compojure combination. I recently decided to try Google Appengine using AppEngine-magic (https://github.com/gcv/appengine-magic). However, both appengine-magic (via the start function) and the run-jetty function for calls accept only 1 handler as a parameter, I implement several handlers and would like to know how to deploy them.
Thanks in advance, Ze
- , - , , , , . , , , ; , run-jetty ( ).
run-jetty
Ring + Compojure ( "" ) , URI (, 404), . defroutes, - .
defroutes
- - , . "" URI nil, , ( , nil out, , , 404).
nil
Compojure ; , Compojure.
, , ring.middleware, :
(defn wrap-ohandler [f handler] (fn [req] (let [ res (f req) ] (if (= res nil) (handler req) res)))) (def handler-wrapped (-> #'main-handler (wrap-ohandler #'anotherhandler ) (wrap-stacktrace) (wrap-params)))
, ?
Source: https://habr.com/ru/post/1780801/More articles:How to combine PNGS with alpha channels into one enlarged image? - phpjQuery UI datepicker date range - jqueryUpdate all fields in the sql table that does not have a specific value - sqlПрочтите источник тега script из кеша в Firefox. - javascriptAlfresco on the Internet - distributedLINQ-to-XYZ polymorphism? - polymorphismSolutions for y for rotated ellipse - mathHow do I know when the Silverlight VisualStateManager.GoToState transition completed? - silverlightNeed to use clarity TestCase - .netLaunch mobile Safari from UIWebView * without * changing application source? - javascriptAll Articles