This commit is contained in:
Fran Jurmanović
2024-09-30 22:00:15 +02:00
parent 518ce27d7c
commit 14a689ad76
19 changed files with 968 additions and 0 deletions

28
cmd/api/main.go Normal file
View File

@@ -0,0 +1,28 @@
package main
import (
"rockhu-bot/local/api"
"rockhu-bot/local/utl/db"
discordrhu "rockhu-bot/local/utl/discord"
"rockhu-bot/local/utl/server"
"github.com/joho/godotenv"
"github.com/robfig/cron/v3"
"go.uber.org/dig"
)
func main() {
godotenv.Load()
di := dig.New()
c := cron.New()
di.Provide(func() *cron.Cron {
return c
})
discordrhu.Init(di)
db.Start(di)
server := server.Start(di)
api.Init(di, server)
}