serverctl/services/entry/cmd/app/main.go

22 lines
439 B
Go
Raw Normal View History

2022-02-16 16:27:48 +01:00
package app
import (
"serverctl/pkg/api"
"serverctl/pkg/infrastructure"
"serverctl/pkg/infrastructure/dependencies"
)
2022-02-17 12:57:45 +01:00
// Run main app, will bootstrap dependencies and run all external ports (http servers, queues, etc).
2022-02-16 16:27:48 +01:00
func Run() {
d := dependencies.New()
d.Logger.Info("Starting serverctl")
2022-02-17 12:57:45 +01:00
// if development add seed data
2022-02-16 16:27:48 +01:00
infrastructure.AddSeedData(d.Database, d.Logger)
api.
NewServerctlApi(d).
SetupApi().
RunApi()
}