mirror of
https://github.com/metosin/reitit.git
synced 2026-02-25 10:32:24 +00:00
fix: dev_workflow.md code example
If I use "(constantly...)", I get the following exception: Exception: java.lang.IllegalArgumentException: No implementation of method: :match-by-path of protocol: #'reitit.core/Router found for class: clojure.core$constantly$fn__5740
This commit is contained in:
parent
76a08a2322
commit
dd27ab6792
1 changed files with 1 additions and 1 deletions
|
|
@ -142,7 +142,7 @@ Let's apply a small change to our ```ns3```. We'll replace our router by two dif
|
|||
["/ping" ::ping]])
|
||||
|
||||
(def dev-router #(r/router (routes))) ;; A router for dev
|
||||
(def prod-router (constantly (r/router (routes)))) ;; A router for prod
|
||||
(def prod-router (r/router (routes))) ;; A router for prod
|
||||
```
|
||||
|
||||
And there you have it, dynamic during dev, performance at production. We have it all !
|
||||
|
|
|
|||
Loading…
Reference in a new issue