main.go 417 B

1234567891011121314151617181920
  1. package config
  2. import "os"
  3. func GetConfig() config {
  4. if !envLoaded {
  5. loadEnv()
  6. }
  7. return config{
  8. DatabaseUrl: getDatabaseUrl(),
  9. LogLevel: getLogLevel(),
  10. LibraryDirectory: os.Getenv("LIBRARY_DIRECTORY"),
  11. LibraryWatch: getLibraryWatch(),
  12. Host: getListenHost(),
  13. Port: getPort(),
  14. RedisUrl: getRedisUrl(),
  15. AllowedOrigins: getAllowedOrigins(),
  16. }
  17. }