Skip to content

Instantly share code, notes, and snippets.

@jackrusher
Created March 8, 2013 03:15
Show Gist options
  • Save jackrusher/5113968 to your computer and use it in GitHub Desktop.
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.
(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