diff --git a/project.clj b/project.clj index bb2c05b..9f19645 100644 --- a/project.clj +++ b/project.clj @@ -1,18 +1,20 @@ -(defproject org.httpkit/chat-websocket "1.0" +(defproject chat "1.0" :description "Realtime chat by utilizing http-kit's websocket support" - :dependencies [[org.clojure/clojure "1.4.0"] - [ring/ring-core "1.1.6"] - [compojure "1.0.2"] - [org.clojure/data.json "0.1.2"] + :dependencies [[org.clojure/clojure "1.10.1"] + [org.clojure/clojurescript "1.10.597"] + [ring/ring-core "1.8.0"] + [ring/ring-defaults "0.3.2"] + [compojure "1.6.1"] + [org.clojure-android/data.json "0.2.6-SNAPSHOT"] [org.clojure/tools.logging "0.2.3"] [ch.qos.logback/logback-classic "1.0.1"] - [http-kit "2.1.5"]] + [http-kit "2.4.0-alpha4"]] :warn-on-reflection true :min-lein-version "2.0.0" :main main :test-paths ["test"] - :plugins [[lein-swank "1.4.4"] - [lein-cljsbuild "0.3.0"]] + :plugins [[lein-swank "1.4.5"] + [lein-cljsbuild "1.1.7"]] :cljsbuild { :builds [{:source-paths ["src-cljs"] :compiler {:output-to "static/main.js" diff --git a/run b/run index a04de81..ce045eb 100755 --- a/run +++ b/run @@ -7,6 +7,7 @@ CP="classes:$(lein classpath):examples/websocket/" java -cp "$CP" \ clojure.main -m main +java -cp `lein classpath` clojure.main -e "(do (set! *warn-on-reflection* true) (require 'qbits.alia.async))" # -Xdebug -Xrunjdwp:transport=dt_socket,address=9092,server=y,suspend=n \ diff --git a/src-cljs/main.cljs b/src-cljs/main.cljs index b859357..d850e41 100644 --- a/src-cljs/main.cljs +++ b/src-cljs/main.cljs @@ -3,7 +3,7 @@ (def i (js/$ "#i")) (def history (js/$ "#history")) -(defn- now [] +(defn- now [] (quot (.getTime (js/Date.)) 1000)) (def max-id (atom 0)) @@ -13,7 +13,7 @@ author (str "
: ")] (.append history (str "