Skip to content

Commit

Permalink
try deploy both hub and API in same time
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaieremia committed Jul 21, 2024
1 parent 353ccd0 commit 0e0aa10
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions api/gin/webServer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
)

const (
defaultRestInterface = "localhost:5000"
defaultRestInterface = ":5000"
)

var log = logger.GetOrCreate("api/gin")
Expand Down Expand Up @@ -162,13 +162,13 @@ func (w *webServer) createGroups() error {
}
groupsMap["status"] = statusGroup

if w.configs.Flags.PublisherType == common.WSPublisherType {
hubHandler, err := groups.NewHubGroup(w.facade)
if err != nil {
return err
}
groupsMap[hubGroupID] = hubHandler
// if w.configs.Flags.PublisherType == common.WSPublisherType {
hubHandler, err := groups.NewHubGroup(w.facade)
if err != nil {
return err
}
groupsMap[hubGroupID] = hubHandler
// }

w.groups = groupsMap

Expand Down
4 changes: 2 additions & 2 deletions notifier/notifierRunner.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (nr *notifierRunner) Start() error {
return err
}

commonHub, err := factory.CreateHub(publisherType)
commonHub, err := factory.CreateHub("ws")
if err != nil {
return err
}
Expand All @@ -56,7 +56,7 @@ func (nr *notifierRunner) Start() error {
return err
}

wsHandler, err := factory.CreateWSHandler(publisherType, commonHub, externalMarshaller)
wsHandler, err := factory.CreateWSHandler("ws", commonHub, externalMarshaller)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion tools/wsPublisher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

const (
hostURL = "127.0.0.1:5000"
hostURL = ":5000"
wsPath = "/hub/ws"
)

Expand Down

0 comments on commit 0e0aa10

Please sign in to comment.