Skip to content
No description, website, or topics provided.
Clojure JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
resources/ring/js
src/ring/middleware
test/ring/middleware/test
.gitignore
README.md
project.clj

README.md

Ring-Refresh

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.

This library is designed for use only in development environments.

Installation

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

[ring-refresh "0.1.2"]

Usage

By default, the middleware monitors the src and resources directories:

(use 'ring.middleware.refresh)

(def app
  (wrap-refresh your-handler))

But it can be customized to include other directories:

(def app
  (wrap-refresh
   your-handler
   ["src" "resources" "checkouts/foo/src"]))

License

Copyright © 2012 James Reeves

Distributed under the Eclipse Public License, the same as Clojure.

You can’t perform that action at this time.