Fork me on GitHub
#pedestal
<
2017-05-24
>
mtnygard00:05:22

@cap10morgan The env key doesn't really do anything. It's kind of a leftover from an age long ago.

mtnygard00:05:42

To make an interceptor behave differently, I'd do 2 things.

mtnygard00:05:32

1. Put an interceptor at the head of the chain that uses a real env value to attach a map to the context. That map would be your environment config.

mtnygard00:05:03

2. Have your interceptors look for specific config values rather than just "what env am I in"

mtnygard00:05:40

That way your choice of config mechanism is independent of how your interceptors are written. You can change either one separately.

cap10morgan02:05:36

OK, makes sense. Thanks!

manutter5113:05:49

Does anybody have some good example code for using Pedestal with transit as an API back end?

jfntn15:05:17

I have an fdef spec for an enter fn that I use in an interceptor, and for some reason it doesn’t seem to check the args when invoking the service-fn in tests with (st/instrument) on. Is there anything pedestal specific that could be causing this, or should I look somewhere else?

jfntn15:05:10

Hmm even s/assert doesn’t run in the enter fn, only s/assert*

souenzzo19:05:38

CompilerException java.lang.AssertionError: Assert failed: In row 1, there were unused elements (:extra :stuff). There is some way to specify extra info on routes? I'm using "#{["/foo" :get [fns] :route-name :bar :extra :stuff]}"