Permalink
Newer
100644
22 lines (18 sloc)
491 Bytes
|
cbeebac
|
||
| 1 | ; An example of inserting the linter between each component to ensure | |
| 2 | ; compliance to the Ring spec. | |
| 3 | ||
|
c5eceba
|
||
| 4 | (ns ring.example.linted | |
|
cbeebac
|
||
| 5 | (:use (ring.handler dump) | |
| 6 | (ring.middleware stacktrace file file-info reload lint) | |
| 7 | (ring.adapter jetty))) | |
| 8 | ||
| 9 | (def app | |
| 10 | (-> handle-dump | |
| 11 | wrap-lint | |
| 12 | wrap-stacktrace | |
| 13 | wrap-lint | |
| 14 | wrap-file-info | |
| 15 | wrap-lint | |
|
f2f4229
|
||
| 16 | (wrap-file "example/public") | |
|
cbeebac
|
||
| 17 | wrap-lint | |
|
f2f4229
|
||
| 18 | (wrap-reload '(ring.handler.dump)) | |
| 19 | wrap-lint)) | |
|
cbeebac
|
||
| 20 | ||
|
f2f4229
|
||
| 21 | (run-jetty app {:port 8080}) |