feat: scaffold fx app and gin server
This commit is contained in:
19
internal/app/app.go
Normal file
19
internal/app/app.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"mal/internal/database"
|
||||
"mal/internal/server"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/fx"
|
||||
)
|
||||
|
||||
func NewApp() *fx.App {
|
||||
return fx.New(
|
||||
database.Module,
|
||||
server.Module,
|
||||
fx.Invoke(func(r *gin.Engine, registers []server.RouteRegister) {
|
||||
server.RegisterRoutes(r, registers)
|
||||
}),
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user