Skip to content

Commit

Permalink
listener
Browse files Browse the repository at this point in the history
  • Loading branch information
olegdayo committed Dec 1, 2024
1 parent 1d78e4a commit 9f8b335
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion code/back/gateway/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"gateway-api/internal/pkg/server"
"gateway-api/internal/pkg/services/specification"
pbgateway "gateway-api/pkg/gateway"

"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/jackc/pgx/v4/pgxpool"
"google.golang.org/grpc"
Expand All @@ -32,7 +33,7 @@ const (
func main() {
ctx := context.Background()

listener, err := net.Listen("tcp", fmt.Sprintf("localhost:%s", grpcPort))
listener, err := net.Listen("tcp", fmt.Sprintf(":%s", grpcPort))
if err != nil {
log.Fatalf("error when listen grpc: %s", err.Error())
}
Expand Down
9 changes: 5 additions & 4 deletions code/back/integrator/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import (
"log"
"net"

"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"integrator-api/internal/app/integrator"
"integrator-api/internal/pkg/server"
pbintegrator "integrator-api/pkg/integrator"

"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)

const (
Expand All @@ -22,7 +23,7 @@ const (
func main() {
ctx := context.Background()

listener, err := net.Listen("tcp", fmt.Sprintf("localhost:%s", grpcPort))
listener, err := net.Listen("tcp", fmt.Sprintf(":%s", grpcPort))
if err != nil {
log.Fatalf("error when listen grpc: %s", err.Error())
}
Expand Down
2 changes: 1 addition & 1 deletion code/back/validator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async fn main() -> std::io::Result<()> {
App::new()
.service(index)
})
.bind(("127.0.0.1", 8080))?
.bind(("0.0.0.0", 8080))?
.run()
.await
}

0 comments on commit 9f8b335

Please sign in to comment.