feat: initial router on main function

This commit is contained in:
ericprd
2025-02-22 16:15:38 +08:00
parent e57fa3ac6c
commit 3dd84e6932
9 changed files with 150 additions and 55 deletions
+6 -14
View File
@@ -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),
)
}