added ApiServerAddress to config
This commit is contained in:
parent
40af1cf5f5
commit
aca1314222
@ -13,7 +13,7 @@ func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
cfg := config.New()
|
||||
apiClient := apiclient.New(cfg.ServerAddress)
|
||||
apiClient := apiclient.New(cfg.ApiServerAddress)
|
||||
server := handlers.NewServer(ctx, cfg, apiClient)
|
||||
|
||||
fmt.Println("The server is online and waiting for requests.")
|
||||
|
@ -8,8 +8,9 @@ import (
|
||||
)
|
||||
|
||||
type Configs struct {
|
||||
ServerAddress string
|
||||
JwtSecret string
|
||||
ServerAddress string
|
||||
JwtSecret string
|
||||
ApiServerAddress string
|
||||
}
|
||||
|
||||
func New() Configs {
|
||||
@ -20,8 +21,9 @@ func New() Configs {
|
||||
|
||||
func getEnvConfig() Configs {
|
||||
return Configs{
|
||||
ServerAddress: os.Getenv("ServerAddress"),
|
||||
JwtSecret: os.Getenv("JwtSecret"),
|
||||
ServerAddress: os.Getenv("ServerAddress"),
|
||||
JwtSecret: os.Getenv("JwtSecret"),
|
||||
ApiServerAddress: os.Getenv("ApiServerAddress"),
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user