add immutant adapter support to the chat-demo
This commit is contained in:
parent
1ade049b2b
commit
72c886e772
|
@ -41,6 +41,10 @@ Once the application server is running, you can then open up
|
|||
http://localhost:8080/ in your browser. Open it in multiple browser
|
||||
windows to see the chat communication in action.
|
||||
|
||||
At the bottom of the `-main` function in `chat-demo.server`, you can
|
||||
comment/uncomment out the different `run-` functions to choose which
|
||||
web server you want to test out the demo with.
|
||||
|
||||
## About
|
||||
|
||||
Written by:
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
[prismatic/dommy "1.1.0"]
|
||||
[net.thegeez/clj-browserchannel-server "0.2.2"]
|
||||
[net.thegeez/clj-browserchannel-jetty-adapter "0.0.9"]
|
||||
[clj-browserchannel-immutant-adapter "0.0.1"]
|
||||
[environ "1.0.3"]]
|
||||
|
||||
:plugins [[lein-cljsbuild "1.1.3"]
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
[clj-pebble.core :as pebble]
|
||||
[net.thegeez.browserchannel :as browserchannel]
|
||||
[net.thegeez.jetty-async-adapter :as jetty]
|
||||
[clj-browserchannel-immutant-adapter.core :as immutant]
|
||||
[environ.core :refer [env]]))
|
||||
|
||||
(defonce clients (atom #{}))
|
||||
|
@ -55,7 +56,16 @@
|
|||
{:join? false
|
||||
:port 8080}))
|
||||
|
||||
(defn run-immutant []
|
||||
(println "Using Immutant adapter")
|
||||
(immutant/run-immutant
|
||||
#'handler
|
||||
{:port 8080}))
|
||||
|
||||
(defn -main [& args]
|
||||
(if (env :dev) (pebble/set-options! :cache false))
|
||||
|
||||
(run-jetty))
|
||||
;(run-jetty)
|
||||
(run-immutant)
|
||||
|
||||
)
|
||||
|
|
Reference in a new issue