This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-21
Channels
- # beginners (201)
- # boot (125)
- # cider (3)
- # cljs-dev (21)
- # cljsrn (165)
- # clojars (8)
- # clojure (332)
- # clojure-belgium (1)
- # clojure-gamedev (8)
- # clojure-russia (75)
- # clojure-spec (25)
- # clojure-uk (96)
- # clojurebridge (2)
- # clojurescript (130)
- # code-reviews (16)
- # cursive (26)
- # datomic (20)
- # devops (6)
- # emacs (6)
- # hoplon (90)
- # jobs (9)
- # luminus (2)
- # off-topic (4)
- # om (65)
- # onyx (5)
- # pedestal (4)
- # protorepl (6)
- # re-frame (34)
- # reagent (12)
- # ring (4)
- # ring-swagger (7)
- # specter (2)
- # test-check (8)
- # untangled (2)
- # vim (1)
- # yada (6)
I’m a big fan of the terse syntax, but I confess it is not the friendliest one for newcomers. Take time to grasp the “vector of vectors of vectors” thing
So I can create a new pedestal project in lein using lein new pedestal-service abc
. In that template, the -main
function calls server/start
with runnable-service
, which calls server/create-server
, which gives the service-map
to create-provider
, which gives the service-map
to default-interceptors
. In default-interceptors
, there are default interceptors defined, for example, the not-found
interceptor. What if I wanted to have NO not-found
interceptor? For a custom one, I’d just specify it in the service map and it would be the one used, but if I wanted to eliminate some interceptors from the default that I felt I didn’t need? Can I build my interceptor list from scratch? Would I then call create-server
? @mtnygard
@joshjones You can definitely build the interceptor list from scratch. http://pedestal.io/reference/default-interceptors shows all the interceptors that get created for you. You're welcome to construct them directly and set the :io.pedestal.http/interceptors key on your service map before calling create-server