Skip to content
Open
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
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,24 @@ Ring-Refresh is a middleware library for Ring that automatically
triggers a browser refresh when your source files change.

It achieves this by injecting a small Javascript script into any HTML
response triggered by a `GET` route.
response triggered by a `GET` route, which then periodically calls back
to a route which it also adds to the server, which tells it whether any source
files have changed and as such, whether it should then reload the page.

This library is designed for use only in development environments.

Note that, in respect of clojure source files already running in a jvm,
you may also wish to use the ring middleware wrap-reload, which also
detects source file changes but in its case, injects changed namespaces
into the running jvm.

Ring-refresh itself will reload static files only and will not touch any running JVM.

## Compatibility with Retit

Currently there is a question mark over whether this library is compatible
with the reitit router. (however wrap-reload seems to work fine).

## Installation

Add the following development dependency to your `project.clj` file:
Expand Down