The Limiting Factor

- semi-structured line noise.

Clojure, Jetty 7 and WebSockets

| Comments

I found this gist by Chris McDevitt which is a simple chat server and browser client that uses Jetty 7, Clojure and WebSockets.

I turned out to be quite a hassle to get it running so I thought I would document it here so others might save some time.

I have create a project on github that includes all the dependencies. I run it in Emacs using swank-clojure-project. The two last forms start the two servers – one is the websocket chat server, the other just serves the index.html file (this is necessary for the web_socket.js  to work). I have only been able to make this work in browsers with native websocket support (Chrome and Safari). If anybody can figure out what goes wrong in the other browsers (e.g. Firefox) let me know, and I will update.