feat: testing

This commit is contained in:
darwincereska
2026-02-18 06:25:35 -05:00
parent 7969004d9d
commit e1f0a638b9
3 changed files with 34 additions and 12 deletions

View File

@@ -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)
}