duct

branch14 2019-10-14T09:54:22.002900Z

Hey, does anyone have an example how to mix site and api routes in one app? Preferably with ataraxy. I was looking for a "meta middleware" (basically a stack of pre-configured middlewares) in module.web to attach to the routes as meta data.

2019-10-14T12:29:53.005100Z

You could start with providing someting like https://github.com/duct-framework/module.web/blob/master/src/duct/module/web.clj#L81-L93 and https://github.com/duct-framework/module.web/blob/master/src/duct/module/web.clj#L81-L93 for :duct.core/handler. There was an example of mixing the api and site configs https://clojurians-log.clojureverse.org/duct/2018-01-04

:duct.module.web/site {}
:duct.core/handler {:middleware [#ig/ref :duct.middleware.web/format]}
:duct.middleware.web/format {}

❤️ 1