Skip to content

Commit ebabf46

Browse files
committed
Bind to 0.0.0.0
1 parent 17c6be0 commit ebabf46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ func main() {
6262
log.Printf(resp.String())
6363
}
6464
} else if cmd == "server" {
65-
lis, err := net.Listen("tcp", fmt.Sprintf("localhost:%d", port))
65+
lis, err := net.Listen("tcp", fmt.Sprintf("0.0.0.0:%d", port))
6666
if err != nil {
6767
log.Fatalf("failed to listen: %v", err)
6868
os.Exit(1)
6969
}
7070

71-
log.Printf("Grpc server running in localhost:%d\n", port)
71+
log.Printf("Grpc server running in 0.0.0.0:%d\n", port)
7272

7373
srv := &service{
7474
plugin: plugin,

0 commit comments

Comments
 (0)