moved from yaml to env config
parent
ea8b3f6d9e
commit
5ba59c0d22
|
@ -5,7 +5,6 @@ import (
|
|||
"strconv"
|
||||
|
||||
gocnjhelper "git.clickandjoin.umbach.dev/ClickandJoin/go-cnj-helper"
|
||||
"github.com/joho/godotenv"
|
||||
)
|
||||
|
||||
var Cfg Config
|
||||
|
@ -40,15 +39,6 @@ type Templates struct {
|
|||
}
|
||||
|
||||
func LoadConfig() {
|
||||
// argument to start the server locally for development
|
||||
if len(os.Args) > 1 {
|
||||
if os.Args[1] == "--local" || os.Args[1] == "-l" {
|
||||
if err := godotenv.Load("local.env"); err != nil {
|
||||
gocnjhelper.LogFatalf("Failed to load env, err: %s", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
debug, err := strconv.ParseBool(os.Getenv("DEBUG"))
|
||||
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue