Tiny web app illustrating WebSocket duplex communication. You are a square: move around and bump into other people's squares.
To start locally, you need to have a recent JDK and Leiningen installed, and then:
rm -rf resources/public/js/compiled; rm -rf target; lein do cljsbuild once prod, uberjar; java -jar target/squares-1.0.0-standalone.jar
Then open (in several different tabs for maximum effect):
http://localhost:3000/index.html
Alternatively, to run in development mode:
-
rm -rf resources/public/js/compiled; lein trampoline figwheel dev
-
After that, in another console: rm -rf target; (echo "(start-web-server false)"; cat <&0) | lein repl
-
In the console from step 1.: (js/alert "greetings from figwheel")
-
In the console from step 2.: (clojure.pprint/pprint @ws-connections)