reitit

https://cljdoc.org/d/metosin/reitit/ https://github.com/metosin/reitit/
kirill.salykin 2020-06-18T15:18:30.160500Z

goodmorning sorry for offtopic question - what is the best place to ask about compojure-api? (didnt find #compojure-api or #metosin channel)

valtteri 2020-06-18T15:49:39.160900Z

Maybe here or #ring-swagger

kirill.salykin 2020-06-18T17:03:37.162Z

ok, the question is: I’d like to use compojure-api async with aleph, it is mentioned that I need some manuak staff to implement - but what exactly? is having just middleware to connect aleph and async-ring

(defn wrap-ring-async-handler
  "Converts given asynchronous Ring handler to Aleph-compliant handler.
   More information about asynchronous Ring handlers and middleware:
   <https://www.booleanknot.com/blog/2016/07/15/asynchronous-ring.html>"
  [handler]
  (fn [request]
    (let [response (d/deferred)]
      (handler request #(d/success! response %) #(d/error! response %))
      response)))
enough? or something else is needed? thanks UPD: seems to work fine with just that middleware, thanks