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?Try removing the parenthesis from the websocket-routes
or make it a defn: (defn websocket-routes [] [["/ws" ws-handler]])
Ugh, not enough sleep last night! Yes, that fixed it. Thanks!