(app-middleware handler & [config])
A donut.system component that applies configured middleware to a handler
A donut.system component that applies configured middleware to a handler
A default configuration for a browser-accessible website, based on current best practice.
A default configuration for a browser-accessible website, based on current best practice.
(wrap-default-index handler
&
[{:keys [root exclude status]
:or {root "public" exclude ["json"] status 404}}])
(wrap-latency handler {:keys [sleep sleep-max]})
Introduce latency, useful for local dev when you want to simulate more realistic response times
Introduce latency, useful for local dev when you want to simulate more realistic response times
(wrap-not-found handler)
(wrap-not-found handler error-handler)
Middleware that returns a 404 'Not Found' response from an error handler if the base handler returns nil.
Used to provide the index.html file by default for frontend routes
Middleware that returns a 404 'Not Found' response from an error handler if the base handler returns nil. Used to provide the index.html file by default for frontend routes
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close