|
@@ -10,7 +10,7 @@
|
|
|
(defrecord App [sente]
|
|
|
component/Lifecycle
|
|
|
(start [component]
|
|
|
- (.info js/console "App started. sente=" sente)
|
|
|
+ (.info js/console "App started. :) :) sente=" sente)
|
|
|
component)
|
|
|
(stop [component]
|
|
|
(.info js/console "App stopped.")
|
|
@@ -45,11 +45,12 @@
|
|
|
component/Lifecycle
|
|
|
(start [c]
|
|
|
(let [sente-chsk (sente/make-channel-socket! "/chsk" {:type :auto
|
|
|
+ :host "localhost:3000" ; FIXME only in figwheel
|
|
|
:client-id (:client-id env)})
|
|
|
c (assoc c :sente-chsk sente-chsk)]
|
|
|
(go (while true
|
|
|
(let [event (<! (:ch-recv sente-chsk))]
|
|
|
- (.info js/console (str "Got event! " event)))))
|
|
|
+ (.info js/console (str "Got event! " (:id event))))))
|
|
|
(.info js/console "Sente started. client-id=" (:client-id env))
|
|
|
|
|
|
(.setTimeout js/window #((:send-fn sente-chsk) [:client/hi]) 500)
|