duct

grierson 2019-06-27T08:55:01.043200Z

How do I add 'wrap-json' middleware to :duct.router/ataraxy?

grierson 2019-06-27T09:06:39.043300Z

kwrooijen 2019-06-27T09:14:37.044100Z

You need to add the ^:example meta tag to the route where you want the middleware to run

kwrooijen 2019-06-27T09:16:15.044400Z

kwrooijen 2019-06-27T09:16:20.044800Z

Something like this

kwrooijen 2019-06-27T09:16:46.045300Z

(Notice the :middleware :example and the ^:example meta tag)

kwrooijen 2019-06-27T09:18:11.046Z

And you also need to add :app.middleware/example in your config edn so that it can be initiated

grierson 2019-06-27T09:51:30.046900Z

nevermind, wrap-json is breaking my app anyway.

grierson 2019-06-27T10:20:47.047900Z

@kevin.van.rooijen Thank you, that worked. Just needed to add the metadata.

kwrooijen 2019-06-27T10:25:47.048300Z

You're welcome :)

Ahmed Hassan 2019-06-27T12:13:21.049400Z

As for modules: >Modules are Integrant keywords that derive from :duct/module, and initiate into maps with two keys: :req and :fn. https://github.com/duct-framework/core#modules