This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-18
Channels
- # admin-announcements (1)
- # aleph (3)
- # beginners (20)
- # boot (9)
- # cider (74)
- # clara (1)
- # cljs-dev (28)
- # cljsrn (15)
- # clojars (32)
- # clojure (149)
- # clojure-dusseldorf (3)
- # clojure-italy (6)
- # clojure-nl (3)
- # clojure-russia (20)
- # clojure-uk (5)
- # clojurescript (133)
- # core-async (2)
- # cursive (19)
- # datomic (24)
- # devcards (1)
- # funcool (100)
- # hoplon (48)
- # keechma (1)
- # kosmos (7)
- # ldnclj (3)
- # leiningen (3)
- # luminus (16)
- # off-topic (8)
- # om (103)
- # onyx (47)
- # pedestal (3)
- # proton (7)
- # re-frame (13)
- # reagent (11)
- # ring-swagger (1)
- # specter (6)
- # testing (12)
- # untangled (24)
- # yada (32)
@niwinz: I am trying to setup a postal handler like so: (pc/router (partial postal-handler !db))
, however, I am getting an error when a client tries to connect No method in multimethod 'attach-route' for dispatch value: [email protected]
. partial
works with multimethods. Is there something happening internally that could be causing this?
It seems like your dispatch funcion in the multimethod expect somethig different for first parameter
If it's any help, here are my routes:
(ct/routes
[[(misc/log)]
[:any (misc/autoreloader)]
[:error all-error-handler]
[:assets "" {:dir "target"
:indexes ["index.html"]}]
[:any "db" (pc/router (partial postal-handler !db))]])
Do I need it? Doesn't have it here: https://funcool.github.io/catacumba/latest/#request-logging
Sorta worked. Old error is gone. Client is having problems connecting:
WebSocket connection to '' failed: Error during WebSocket handshake: Unexpected response code: 200
now, with that error, just check the handler that dispatches that request and ensure that it handshakes to websocket
Not sure why the handler isn't dispatching correctly though.. This is all the code atm:
(defmulti postal-handler (fn [_ _ frame]
(println "here")
(select-keys frame [:type :dest])))
(defmethod postal-handler {:type :subscribe
:dest :db}
[!db ctx frame]
(letfn [(on-connect [{:keys [in out]}]
(println "connected!"))]
(pc/socket ctx on-connect)))
The request is logged but you can't be sure that the request is properly dispatched to this implementation.
The router is a pipeline, if you put less restrictive rules on top, them will not allow pass requests down...
Wait... My debugging may be incorrect. I have been stopping and restarting the server but I just restarted the repl and I saw a new "stopping server..." print out. I know calling (.stop srvr)
used to stop the server but has a Catacumba update changed this?
Also, I just verified this... I called (.stop srvr)
and the log printed
25286 [nREPL-worker-0] INFO ratpack.server.RatpackServer - Stopping server...
25307 [nREPL-worker-0] INFO ratpack.server.RatpackServer - Server stopped.
but the server is still running@kenny: for use properly the autoreloader handler, you should define the handlers as vars, and pass that vars references to the routes
.
but as I have said previously, only works if you pass var references instead of handler instances directly.
About the stop the server, seems very strange because in my own projects, with reloaded workflow, it stops correctly :S
@niwinz: This behaviour is not happening in my sandbox environment. Must be something special about my current project. Will dive deeper into it tomorrow...
Will do. BTW, regarding beicon and Clojure. Have you looked at using RxJava for the clojure implementation? I believe it can properly handle back pressure.
Hi all! Is my understanding correct that htturr does not support https (at least on a node.js)? Or am I missing something?
now that you mention it I see that if you want an HTTPS client you have to require("https")
instead of require("http")
and the node client requires the http
one https://github.com/funcool/httpurr/blob/master/src/httpurr/client/node.cljs#L7
otherwise i can make the http
module used by the client a dynamic var, similar to Xhr's client's *xhr-impl*
I'm not sure if HTTPS client supports HTTP (I'm not very familiar with node) but I suspect you must choose one of them depending on url
happy to merge a patch with these changes, otherwise maybe i can address it during the weekend
In fact, the node client requires a great revision, because is the "less used" and less maintained
Sent a pull request https://github.com/funcool/httpurr/pull/6