Fork me on GitHub
#luminus
<
2019-04-25
>
peterdee15:04:01

I am trying to set up a websocket using the example in the luminus documentation. I am hitting a problem in handler.clj starting the app:

(mount/defstate app
  :start
  (middleware/wrap-base
    (ring/ring-handler
      (ring/router
        [(home-routes)
         (service-routes)
         (websocket-routes)])
websocket-routes is just defined as (def websocket-routes [["/ws" ws-handler]]) as indicated in the tutorial. I note that home-routes and service-routes, though defined somewhat similarly, now (after starting) evaluate to a function. websocket-routes still looks like the def. Have I missed a step in setting this up?

ikitommi16:04:11

Try removing the parenthesis from the websocket-routes or make it a defn: (defn websocket-routes [] [["/ws" ws-handler]])

peterdee16:04:02

Ugh, not enough sleep last night! Yes, that fixed it. Thanks!