Handlers, DB, Cache

This commit is contained in:
2026-03-10 19:17:43 +03:00
parent e56b1f1305
commit 968c030939
23 changed files with 566 additions and 34 deletions

View File

@@ -1,19 +1,32 @@
package main
import (
"log/slog"
"os"
"go.uber.org/fx"
"go.uber.org/fx/fxevent"
"payouts/internal/api"
"payouts/internal/config"
"payouts/internal/log"
"payouts/internal/service/cache"
"payouts/internal/service/database"
)
func main() {
app := fx.New(
api.Module,
cache.Module,
config.Module,
database.Module,
log.Module,
fx.WithLogger(func() fxevent.Logger {
// log internal fx events just to stdout json because app config isn't read yet
return &fxevent.SlogLogger{Logger: slog.New(slog.NewJSONHandler(os.Stdout, nil))}
}),
)
app.Run()
}