feat: added post methods for strapi service

This commit is contained in:
darwincereska
2026-02-17 06:23:00 -05:00
parent 6384b0d874
commit 3afb3477ec
5 changed files with 283 additions and 5 deletions

View File

@@ -4,6 +4,8 @@ import (
"blog/internal/database"
"blog/internal/config"
"github.com/charmbracelet/log"
"blog/internal/cache"
"blog/internal/services"
)
func main() {
@@ -21,4 +23,11 @@ func main() {
log.Fatal("Failed to connect to database: ", err)
}
defer db.Close()
// Create Redis caches
strapi_cache := cache.CreateCache(server_config.RedisHost, server_config.RedisPort, 0)
analytics_cache := cache.CreateCache(server_config.RedisHost, server_config.RedisPort, 1)
// Create Strapi service
strapi_service := services.NewStrapiService(server_config.StrapiHost, server_config.StrapiApiKey, strapi_cache)
}