Move into api routers instead of main
This commit is contained in:
19
services/entry/cmd/app/main.go
Normal file
19
services/entry/cmd/app/main.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"serverctl/pkg/api"
|
||||
"serverctl/pkg/infrastructure"
|
||||
"serverctl/pkg/infrastructure/dependencies"
|
||||
)
|
||||
|
||||
func Run() {
|
||||
d := dependencies.New()
|
||||
d.Logger.Info("Starting serverctl")
|
||||
|
||||
infrastructure.AddSeedData(d.Database, d.Logger)
|
||||
|
||||
api.
|
||||
NewServerctlApi(d).
|
||||
SetupApi().
|
||||
RunApi()
|
||||
}
|
Reference in New Issue
Block a user