feat: testing
This commit is contained in:
@@ -8,10 +8,10 @@ import (
|
||||
type ServerConfig struct {
|
||||
Host string
|
||||
Port int
|
||||
StrapiHost string
|
||||
StrapiEndpoint string
|
||||
RedisHost string
|
||||
RedisPort int
|
||||
StrapiApiKey string
|
||||
StrapiToken string
|
||||
CacheTTL int
|
||||
EchoMode string
|
||||
}
|
||||
@@ -23,8 +23,8 @@ func NewServerConfig() *ServerConfig {
|
||||
func (c *ServerConfig) LoadConfig() {
|
||||
c.Host = env.GetString("HOST", "0.0.0.0")
|
||||
c.Port = env.GetInt("PORT", 3000)
|
||||
c.StrapiHost = env.GetString("STRAPI_HOST", "https://strapi.darwincereska.dev")
|
||||
c.StrapiApiKey = env.GetString("STRAPI_API_KEY", "")
|
||||
c.StrapiEndpoint = env.GetString("STRAPI_ENDPOINT", "https://strapi.darwincereska.dev")
|
||||
c.StrapiToken = env.GetString("STRAPI_TOKEN", "")
|
||||
c.RedisHost = env.GetString("REDIS_HOST", "localhost")
|
||||
c.RedisPort = env.GetInt("REDIS_PORT", 6379)
|
||||
c.CacheTTL = env.GetInt("CACHE_TTL", 3600)
|
||||
@@ -34,7 +34,7 @@ func (c *ServerConfig) LoadConfig() {
|
||||
log.Info("Host", "host", c.Host)
|
||||
log.Info("Port", "port", c.Port)
|
||||
log.Info("Redis Host", "host", c.RedisHost)
|
||||
log.Info("Strapi URL", "host", c.StrapiHost)
|
||||
log.Info("Strapi URL", "host", c.StrapiEndpoint)
|
||||
log.Info("Echo Mode", "mode", c.EchoMode)
|
||||
log.Info("Cache TTL", "ttl", c.CacheTTL)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user