presumably working basic routing + db queries
This commit is contained in:
23
config/config.go
Normal file
23
config/config.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package config
|
||||
|
||||
import "os"
|
||||
|
||||
type Config struct {
|
||||
DB struct {
|
||||
DSN string
|
||||
}
|
||||
JWT struct {
|
||||
Secret string
|
||||
}
|
||||
}
|
||||
|
||||
func GetCfg() Config {
|
||||
return Config{
|
||||
DB: struct{ DSN string }{
|
||||
DSN: os.Getenv("DB_DSN"),
|
||||
},
|
||||
JWT: struct{ Secret string }{
|
||||
Secret: os.Getenv("JWT_SECRET"),
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user