afrey/ring-html5-handler

Ring handler to server HTML5 single page application


License
MIT

Documentation

ring-html5-handler

Clojars Project

A simple ring handler for serving a site using HTML5 History routes. The handler serves assets from the resource paths, and serves the index.html resource for any unmatched route, to be handled by the JS/CLJS router.

Usage

With boot-http:

(require '[pandeiro.boot-http :refer [serve]])

(serve :handler 'afrey.ring-html5-handler/handler)

With lein-ring:

:ring {:handler afrey.ring-html5-handler/handler}

Or use it with any other ring compatible server.