Added env load from one directory higher
This commit is contained in:
parent
70c76c62c3
commit
d819b04020
@ -17,7 +17,7 @@ type Config struct {
|
|||||||
|
|
||||||
type DBConfig struct {
|
type DBConfig struct {
|
||||||
Host string
|
Host string
|
||||||
Port string // NOTE: you use POSTGRES_PORT for this
|
Port string
|
||||||
User string
|
User string
|
||||||
Password string
|
Password string
|
||||||
Name string
|
Name string
|
||||||
@ -28,6 +28,7 @@ type DBConfig struct {
|
|||||||
|
|
||||||
func Load() Config {
|
func Load() Config {
|
||||||
_ = godotenv.Load()
|
_ = godotenv.Load()
|
||||||
|
_ = godotenv.Load("../.env")
|
||||||
|
|
||||||
cfg := Config{
|
cfg := Config{
|
||||||
Addr: getenv("ADDR", ":8082"),
|
Addr: getenv("ADDR", ":8082"),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user