Created
March 8, 2013 03:15
-
-
Save jackrusher/5113968 to your computer and use it in GitHub Desktop.
Aleph/Lamina makes it crazy easy to log events using WebSocket in clojure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use 'lamina.core 'aleph.http) | |
(defn log-handler [ch handshake] | |
(receive-all ch #(spit "event.log" % :append true))) | |
(def server | |
(start-http-server log-handler {:port 6969 :websocket true})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment