25 lines
594 B
Go
25 lines
594 B
Go
package bootstrap
|
|
|
|
import (
|
|
"git.toki-labs.com/toki/ariadne/internal/platform/config"
|
|
"git.toki-labs.com/toki/ariadne/internal/platform/database"
|
|
"git.toki-labs.com/toki/ariadne/internal/platform/httpserver"
|
|
"git.toki-labs.com/toki/ariadne/internal/platform/logging"
|
|
"go.uber.org/fx"
|
|
)
|
|
|
|
func New(version string) *fx.App {
|
|
return fx.New(
|
|
fx.Supply(httpserver.BuildInfo{Version: version}),
|
|
fx.Provide(
|
|
config.Load,
|
|
logging.New,
|
|
fx.Annotate(
|
|
database.New,
|
|
fx.As(new(httpserver.Readiness), fx.Self()),
|
|
),
|
|
httpserver.New,
|
|
),
|
|
fx.Invoke(httpserver.Register),
|
|
)
|
|
}
|