This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-03
Channels
- # arachne (31)
- # aws (9)
- # bangalore-clj (7)
- # beginners (46)
- # boot (18)
- # cider (21)
- # cljs-dev (8)
- # clojure (154)
- # clojure-dusseldorf (5)
- # clojure-filipino (3)
- # clojure-ireland (4)
- # clojure-italy (9)
- # clojure-russia (6)
- # clojure-spec (6)
- # clojure-uk (52)
- # clojureremote (3)
- # clojurescript (173)
- # clojurewest (14)
- # cursive (24)
- # data-science (2)
- # datomic (18)
- # defnpodcast (1)
- # devcards (1)
- # hoplon (4)
- # instaparse (29)
- # jobs (2)
- # juxt (1)
- # leiningen (3)
- # lumo (78)
- # off-topic (46)
- # om (9)
- # onyx (42)
- # pedestal (33)
- # perun (3)
- # re-frame (9)
- # reagent (6)
- # slack-help (5)
- # spacemacs (2)
- # specter (6)
- # unrepl (157)
- # untangled (99)
- # yada (32)
Do you guys know if I assign ::http/interceptors []
, even it's an empty vector, then when there is an error, the only message I got is : Internal server error : no response
. if I don't have ::http/interceptors
, it returns a nice stack trace for me to debug. What is the right way to provide default interceptors on current service ?
https://www.youtube.com/watch?v=_Cf-STRvFy8 Great talk, cannot wait to see pedestal chain on clojurescript !
@nxqd Just update conj
the ::http/interceptors
after you put called the default-interceptors
. (Without the :http/interceptors
since if default-interceptors
sees that map key it won't do anything.)
Is content negotiation + coercion a manual practice like described in http://pedestal.io/guides/hello-world-content-types or is there some provided sane defaults in Pedestal?
Hi all, is this the right place for Vase-related questions or should I take it to #vase?
@crimeminister not sure who’s using #vase. I think this is the right place for now.
Am wondering about the possibility of using specs defined in an external library; getting Unable to resolve spec: :com.example/some-spec
when I try. Anyone know if this is supported?
I should go spelunking, but figured it couldn't hurt to ask first ;)
If so then I don’t see why that wouldn’t work. I imagine you need to require the appropriate namespaces before reading in the vase descriptor(s)
Cool, I will give it another whirl, thank you
That worked, much appreciated
Am wondering: would it make sense to provide a list of namespaces to require as part of the Vase edn config?
I think that’s app-specific. You normally won’t need much more than what’s defined in the service.clj
file which is created by the Vase lein template.
Remember specs are registered globally. They’re actually stored in an atom defined in the spec ns.
This means that specs defined in your descriptor(s) are also available elsewhere in your Vase-enabled app
Agreed, just thinking that on occasion it might be useful to specify a namespace to evaluate as part of Vase config so the spec can be used by a #vase/validate
without a having to touch server/service.clj
. Minor thing though.
Didn't realize that was how spec was implemented; interesting
I have several apps all using shared specs in a library, just pulling those into the Vase microservice I am playing with
Hmm, IMO the convenience does not outweigh the trouble of implementing and supporting such a feature.
Quite likely, and not sure how common this pattern is anyways
No doubt others will chime in if it might be useful ;)
Does anyone got an example how to load resources from a jar? I tried this:
(def font-awesome-webjars-resource-path “META-INF/resources/webjars/font-awesome/4.7.0”)
…
service-map {::http/routes routes
::http/type :jetty
::http/join? false
::http/resource-path "/public"
;; Doesn't work yet
::http/default-interceptors [(middlewares/resource
font-awesome-webjars-resource-path)
]
::http/port port}
I think you might want to look at
, specifically (io/resource …)
Am in transit, otherwise would post a more substantial example, sorry