abimaran/mobile-for-compojure
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
This is a small library for creating middleware to handle mobile browsers in compojure applications.
## Usage
To run the example application:
lein dpes
lein repl src/mobile/example.clj
To apply the middleware to your own application:
First define the function that will transform your response, if a mobile device is detected
(defn myfunc ...)
Then apply the middleware:
(wrap! name_of_your_app
((handle-mobile myfunc)))
That's it!
## Installation
Get leiningen
Download this repo
Run 'lein deps'