Get session secret from env instead of hardcoding
This commit is contained in:
1 parent
4688d2d94d
commit
578e7d071c
5 files changed
+16
-8
No files matched your search
@@ -7,12 +7,14 @@ import (
|
||||
// Config contains all needed configurations.
|
||||
type Config struct {
|
||||
DatabaseConnection string
|
||||
SessionSecret string
|
||||
}
|
||||
|
||||
// LoadConfig from path.
|
||||
func LoadConfig() (*Config, error) {
|
||||
configuration := Config{
|
||||
DatabaseConnection: os.Getenv("BUDGETEER_DB"),
|
||||
SessionSecret: os.Getenv("BUDGETEER_SESSION_SECRET"),
|
||||
}
|
||||
|
||||
return &configuration, nil
|
||||
|
||||
Reference in new issue
Block a user