feat: initial router on main function
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
package main
|
||||
|
||||
func main() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+6
-14
@@ -1,22 +1,14 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
|
||||
internalhttp "github.com/ardeman/project-legalgo-go/internal/api/http"
|
||||
pkgconfig "github.com/ardeman/project-legalgo-go/internal/config"
|
||||
"go.uber.org/fx"
|
||||
)
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
app, err := fx.New()
|
||||
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if err := app.Run(ctx); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
fx.New(
|
||||
fx.Provide(internalhttp.Module),
|
||||
fx.Invoke(pkgconfig.Router),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user