Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mikew1 authored Dec 9, 2024
1 parent 3065d91 commit 3e426a8
Showing 1 changed file with 15 additions and 1 deletion.
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

0 comments on commit 3e426a8

Please sign in to comment.