Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject ring-server "0.3.1"
(defproject ring-server "0.3.2"
:description "Library for running Ring web servers"
:url "https://github.com/weavejester/ring-server"
:license {:name "Eclipse Public License"
Expand Down
6 changes: 6 additions & 0 deletions src/ring/server/options.clj
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,11 @@
(:stacktraces? options dev-env?))

(defn reload-paths
"Specify the paths for source code that should get reloaded."
[options]
(:reload-paths options ["src"]))

(defn refresh-paths
"Specify the paths that should trigger browser refreshes."
[options]
(:refresh-paths options ["src" "resources"]))
5 changes: 3 additions & 2 deletions src/ring/server/standalone.clj
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

(defn- add-auto-refresh [handler options]
(if (:auto-refresh? options)
(wrap-refresh handler)
(wrap-refresh handler (refresh-paths options))
handler))

(defn- add-middleware [handler options]
Expand All @@ -81,8 +81,9 @@
:browser-uri - the path to browse to when opening a browser
:stacktraces? - if true, display stacktraces when an exception is thrown
:auto-reload? - if true, automatically reload source files
:reload-paths - seq of src-paths to reload on change - defaults to [\"src\"]
:reload-paths - seq of src-paths to reload on change - defaults to [\"src\"]
:auto-refresh? - if true, automatically refresh browser when source changes
:refresh-paths - seq of src-paths that will trigger browser to refresh - defaults to [\"src\" \"resources\"]. only relevant if :auto-refresh? equals true

If join? is false, a Server object is returned."
{:arglists '([handler] [handler options])}
Expand Down