Handlers, DB, Cache
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user