Files
payouts/cmd/payouts/main.go
2026-03-10 19:17:43 +03:00

33 lines
578 B
Go

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