features/token-things #2
@ -13,7 +13,7 @@ func main() {
|
|||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
cfg := config.New()
|
cfg := config.New()
|
||||||
apiClient := apiclient.New(cfg.ServerAddress)
|
apiClient := apiclient.New(cfg.ApiServerAddress)
|
||||||
server := handlers.NewServer(ctx, cfg, apiClient)
|
server := handlers.NewServer(ctx, cfg, apiClient)
|
||||||
|
|
||||||
fmt.Println("The server is online and waiting for requests.")
|
fmt.Println("The server is online and waiting for requests.")
|
||||||
|
@ -10,6 +10,7 @@ import (
|
|||||||
type Configs struct {
|
type Configs struct {
|
||||||
ServerAddress string
|
ServerAddress string
|
||||||
JwtSecret string
|
JwtSecret string
|
||||||
|
ApiServerAddress string
|
||||||
}
|
}
|
||||||
|
|
||||||
func New() Configs {
|
func New() Configs {
|
||||||
@ -22,6 +23,7 @@ func getEnvConfig() Configs {
|
|||||||
return Configs{
|
return Configs{
|
||||||
ServerAddress: os.Getenv("ServerAddress"),
|
ServerAddress: os.Getenv("ServerAddress"),
|
||||||
JwtSecret: os.Getenv("JwtSecret"),
|
JwtSecret: os.Getenv("JwtSecret"),
|
||||||
|
ApiServerAddress: os.Getenv("ApiServerAddress"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user