diff options
author | Mo Tarbin <mhed.t91@gmail.com> | 2024-07-24 01:07:11 -0400 |
---|---|---|
committer | Mo Tarbin <mhed.t91@gmail.com> | 2024-07-24 01:07:11 -0400 |
commit | a88946bb7fcfc1632661eafc84eac0aa1c2573c3 (patch) | |
tree | 4e39423ed3feb3d50fa5178b2aef6a3a4e3881a8 /config/config.go | |
parent | 5cfb906a4f4d9242b69c85c33f3e350f95820ed2 (diff) | |
download | donetick-a88946bb7fcfc1632661eafc84eac0aa1c2573c3.tar.gz donetick-a88946bb7fcfc1632661eafc84eac0aa1c2573c3.tar.bz2 donetick-a88946bb7fcfc1632661eafc84eac0aa1c2573c3.zip |
Update server configuration to disable serving frontend
Diffstat (limited to 'config/config.go')
-rw-r--r-- | config/config.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/config/config.go b/config/config.go index fc21b49..b38e808 100644 --- a/config/config.go +++ b/config/config.go @@ -48,6 +48,7 @@ type ServerConfig struct { ReadTimeout time.Duration `mapstructure:"read_timeout" yaml:"read_timeout"` WriteTimeout time.Duration `mapstructure:"write_timeout" yaml:"write_timeout"` CorsAllowOrigins []string `mapstructure:"cors_allow_origins" yaml:"cors_allow_origins"` + ServeFrontend bool `mapstructure:"serve_frontend" yaml:"serve_frontend"` } type SchedulerConfig struct { @@ -105,6 +106,8 @@ func LoadConfig() *Config { viper.SetConfigName("local") } else if os.Getenv("CA_ENV") == "prod" { viper.SetConfigName("prod") + } else if os.Getenv("CA_ENV") == "selfhosted" { + viper.SetConfigName("selfhosted") } else { viper.SetConfigName("local") } |