feat: added post methods for strapi service
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user