[ws] fix hardcoded localhost:8008 websocket port

parent e97e7b30
Pipeline #6698 passed with stages
in 19 minutes and 11 seconds
...@@ -15,7 +15,7 @@ import Gargantext.Hooks.FirstEffect (useFirstEffect') ...@@ -15,7 +15,7 @@ import Gargantext.Hooks.FirstEffect (useFirstEffect')
import Gargantext.Router as Router import Gargantext.Router as Router
import Gargantext.Sessions as Sessions import Gargantext.Sessions as Sessions
import Gargantext.Types (CacheParams, defaultCacheParams) import Gargantext.Types (CacheParams, defaultCacheParams)
import Gargantext.Utils (getter) import Gargantext.Utils (getter, host)
import Gargantext.Utils.Reactix as R2 import Gargantext.Utils.Reactix as R2
import Reactix as R import Reactix as R
import Reactix.Utils as RU import Reactix.Utils as RU
...@@ -110,7 +110,8 @@ mainAppCpt = here.component "main" cpt where ...@@ -110,7 +110,8 @@ mainAppCpt = here.component "main" cpt where
let session = Seq.head sessions let session = Seq.head sessions
-- here.log2 "[mainApp] sessions" sessions' -- here.log2 "[mainApp] sessions" sessions'
wsProto <- Notifications.wsProtocol wsProto <- Notifications.wsProtocol
Notifications.connect ws (wsProto <> "://localhost:8008/ws") session h <- host
Notifications.connect ws (wsProto <> "://" <> h <> "/ws") session
-- T.write_ ws boxes.wsNotification -- T.write_ ws boxes.wsNotification
-- NOTE: Dummy subscription -- NOTE: Dummy subscription
-- let action = NotificationsT.InsertCallback (NotificationsT.UpdateTree (-1)) "some-uuid" (\_ -> here.log "callback!") -- let action = NotificationsT.InsertCallback (NotificationsT.UpdateTree (-1)) "some-uuid" (\_ -> here.log "callback!")
......
...@@ -112,6 +112,8 @@ href = location >>= WHL.href ...@@ -112,6 +112,8 @@ href = location >>= WHL.href
protocol :: Effect String protocol :: Effect String
protocol = location >>= WHL.protocol protocol = location >>= WHL.protocol
host :: Effect String
host = location >>= WHL.host
nbsp :: Int -> String nbsp :: Int -> String
nbsp = nbsp' "" nbsp = nbsp' ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment