Skip to content

Commit 4723728

Browse files
authored
Merge pull request #116 from clojureverse/arne/rebuild-router-on-request
Arne/rebuild router on request
2 parents e9ba973 + c822c70 commit 4723728

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,18 @@ user=> (r/load-demo-data! "/path/to/clojurians-log-demo-data")
5151
/path/to/clojurians-log-demo-data/2018-02-02.txt
5252
/path/to/clojurians-log-demo-data/2018-02-03.txt
5353
...
54-
```
5554

5655
Note for WSL users - please enter the below command in your terminal before running any of the above commands:
5756

5857
```
5958
export CLOJURIANS_LOG_HOST="0.0.0.0"
6059
```
6160
62-
You can see it in action at [http://localhost:4983](http://localhost:4983)
61+
You can see it in action at [http://localhost:4983](http://localhost:4983), or start a browser with
62+
63+
```
64+
user=> (browse)
65+
```
6366
6467
## Some tips on development
6568

src/clojurians_log/application.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
(component/system-map
2929
:config (->ValueComponent (atom cfg))
3030
:routes (-> (new-endpoint (fn [endpoint]
31-
(let [router (reitit.ring/router routes/routes)
32-
handler (reitit.ring/ring-handler router)]
33-
(fn [request]
31+
(fn [request]
32+
(let [router (reitit.ring/router routes/routes)
33+
handler (reitit.ring/ring-handler router)]
3434
(handler (assoc request
3535
:endpoint endpoint
3636
:config cfg

0 commit comments

Comments
 (0)