Token and session implementation with Redis

This commit is contained in:
2026-05-08 18:41:14 +07:00
parent fe57aab3b4
commit 3c103b7692
20 changed files with 545 additions and 90 deletions
+7 -2
View File
@@ -12,13 +12,18 @@ func main() {
cfg := config.LoadConfig()
logger.Setup(cfg.LogLevel(), cfg.LogFormat())
db, err := db.NewPostgres(cfg.Database)
pg, err := db.NewPostgres(cfg.Database)
if err != nil {
log.Fatal(err)
}
redisClient, err := db.NewRedisClient(cfg.Redis)
if err != nil {
log.Fatal(err)
}
logger.NonContext.Info("helloworld")
application := app.NewApp(db)
application := app.NewApp(pg, redisClient)
if err := application.Initialize(cfg); err != nil {
log.Fatalf("Failed to initialize application: %v", err)