moved from yaml to env config
parent
98d1d26394
commit
8005429cbf
|
@ -40,9 +40,14 @@ type Templates struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func LoadConfig() {
|
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 {
|
if err := godotenv.Load("local.env"); err != nil {
|
||||||
gocnjhelper.LogFatalf("Failed to load env, err: %s", err)
|
gocnjhelper.LogFatalf("Failed to load env, err: %s", err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
debug, err := strconv.ParseBool(os.Getenv("DEBUG"))
|
debug, err := strconv.ParseBool(os.Getenv("DEBUG"))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue