serverctl/services/entry/cmd/app/main.go
2022-02-17 12:57:45 +01:00

22 lines
439 B
Go

package app
import (
"serverctl/pkg/api"
"serverctl/pkg/infrastructure"
"serverctl/pkg/infrastructure/dependencies"
)
// Run main app, will bootstrap dependencies and run all external ports (http servers, queues, etc).
func Run() {
d := dependencies.New()
d.Logger.Info("Starting serverctl")
// if development add seed data
infrastructure.AddSeedData(d.Database, d.Logger)
api.
NewServerctlApi(d).
SetupApi().
RunApi()
}