Skip to content

Commit

Permalink
fix: router listen address default port (wundergraph#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisnithin authored Feb 19, 2024
1 parent 357ffae commit 8315997
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion router/pkg/config/__snapshots__/config_test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@
"InstanceID": "",
"IntrospectionEnabled": true,
"JSONLog": true,
"ListenAddr": "localhost:3003",
"ListenAddr": "localhost:3002",
"LivenessCheckPath": "/health/live",
"LocalhostFallbackInsideDocker": true,
"LogLevel": "info",
Expand Down
5 changes: 3 additions & 2 deletions router/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package config

import (
"fmt"
"github.com/goccy/go-yaml"
"os"
"time"

"github.com/goccy/go-yaml"

"github.com/joho/godotenv"
"github.com/kelseyhightower/envconfig"
"github.com/wundergraph/cosmo/router/pkg/otel/otelconfig"
Expand Down Expand Up @@ -289,7 +290,7 @@ type Config struct {
Headers HeaderRules `yaml:"headers,omitempty"`
TrafficShaping TrafficShapingRules `yaml:"traffic_shaping,omitempty"`

ListenAddr string `yaml:"listen_addr" default:"localhost:3003" envconfig:"LISTEN_ADDR"`
ListenAddr string `yaml:"listen_addr" default:"localhost:3002" envconfig:"LISTEN_ADDR"`
ControlplaneURL string `yaml:"controlplane_url" default:"https://cosmo-cp.wundergraph.com" envconfig:"CONTROLPLANE_URL"`
PlaygroundEnabled bool `yaml:"playground_enabled" default:"true" envconfig:"PLAYGROUND_ENABLED"`
IntrospectionEnabled bool `yaml:"introspection_enabled" default:"true" envconfig:"INTROSPECTION_ENABLED"`
Expand Down

0 comments on commit 8315997

Please sign in to comment.