Fork me on GitHub
#pedestal
<
2016-12-21
>
andrewhr13:12:26

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

marciol14:12:48

indentation could help in this case

joshjones18:12:44

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

mtnygard18:12:07

@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