package cfg

import (
	"github.com/kelseyhightower/envconfig"
)

type configStruct struct {
	AppHost        string `default:"0.0.0.0"`
	AppPort        int    `default:"4000"`
	DbHost         string `default:"localhost"`
	DbPort         int    `default:"55432"`
	DbName         string `default:"komponiranje"`
	DbUser         string `default:"pero"`
	DbPassword     string `default:"pero.000"`
	ProductsAppUrl string `default:"http://localhost:4001"`
}

const ENV_PREFIX = ""

var Config configStruct

func init() {
	err := envconfig.Process(ENV_PREFIX, &Config)
	if err != nil {
		panic(err)
	}
}
