emoji is a library that provides ring middleware and pedestal
interceptorware to replace a response containing emoji names with bundled
emoji images.
To use as an interceptor for a pedestal service:
(require '[io.pedestal.service.interceptor :refer [defon-response]])
(require '[emoji.core :refer [emoji-response]])
(defon-response emoji-interceptor
[response]
(emoji-response response))
;; add emoji-interceptor to a route
["/" {:get some-endpoint ^:interceptors [emoji-interceptor]]
To use as middleware for a ring app:
(require '[emoji.core :refer [emoji-response]])
(require '[ring.middleware.resource :refer [wrap-resource]])
;; Assuming a compojure routes table called app-routes
;; resource middleware is needed to serve up bundled emojis
(-> app-routes
wrap-emoji
(wrap-resource "/public"))
For more info, see https://github.com/cldwalker/emoji
For a demo app using it, see http://emojinator.herokuapp.com/
and https://github.com/cldwalker/emojinator
Have fun!
Gabriel
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.