Fork me on GitHub
#reitit
<
2018-10-19
>
ikitommi08:10:02

@suomi.esko I think we use our own websocket library in all the project now, but Sente should work just like the Compojure sample shows in the Sente README.

ikitommi08:10:24

(defroutes my-app-routes
  ;; <other stuff>

  ;;; Add these 2 entries: --->
  (GET  "/chsk" req (ring-ajax-get-or-ws-handshake req))
  (POST "/chsk" req (ring-ajax-post                req))
  )

ikitommi08:10:07

with reitit, would be something like:

["/chsk" {:get ring-ajax-get-or-ws-handshake, :post... }]

ikitommi08:10:51

example under /examples would be nice.

eskos11:10:01

Only after asking yesterday I realized I didn't have the project on the computer I was posting from so couldn't really jump into this to see what my issue is...I'll get back to this today. Probably something really dumb like middlewares in wrong order or smth