add initial application structure with configuration, logging, and health check endpoints

This commit is contained in:
kever
2026-01-14 23:58:00 +08:00
commit fed727e593
31 changed files with 770 additions and 0 deletions

24
internal/infra/module.go Normal file
View File

@@ -0,0 +1,24 @@
package infra
import (
"go.uber.org/fx"
"epic-ent/internal/infra/cache"
"epic-ent/internal/infra/cron"
"epic-ent/internal/infra/db"
"epic-ent/internal/infra/http"
infraLog "epic-ent/internal/infra/log"
)
var Module = fx.Options(
fx.Provide(
infraLog.NewLogger,
db.NewMySQL,
cache.NewRedis,
http.NewEcho,
),
fx.Invoke(
cron.RegisterJobs,
http.StartServer,
),
)